Skip to content
Snippets Groups Projects
Commit 6ef4b616 authored by Dmitry Popov's avatar Dmitry Popov
Browse files

Merge branch 'mtfix_msctest' into 'master'

MT build msc test fix

See merge request lhcb/Geant4!99
parents 8b51444d 92d13455
No related branches found
No related tags found
1 merge request!99MT build msc test fix
......@@ -74,8 +74,12 @@ int main(int argc,char** argv) {
// Construct the default run manager
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(),4);
if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
// G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(), 4);
// enforce default one thread
G4int nThreads = 1;
if (argc==4) {
nThreads = G4UIcommand::ConvertToInt(argv[3]);
}
runManager->SetNumberOfThreads(nThreads);
G4cout << "===== TestEm5 is started with "
<< runManager->GetNumberOfThreads() << " threads =====" << G4endl;
......@@ -91,7 +95,7 @@ int main(int argc,char** argv) {
// LHCb
int n = 1;
if (argc == 3) {
n = std::atoi(argv[2]);
n = G4UIcommand::ConvertToInt(argv[2]);
}
RMSPlotter* rmsplotter = new RMSPlotter(n);
......@@ -113,6 +117,7 @@ int main(int argc,char** argv) {
std::cout << "Made ToyMC Style Plots" << std::endl;
TGraphErrors* rms_fitted_plot = rmsplotter->MakeFittedPlots();
rms_fitted_plot->SetName("GraphFitted");
std::cout << "Made Fitted Brute Force Plot" << std::endl;
std::vector<TH1D*> histos = rmsplotter->GetDistributions();
......
......@@ -27,7 +27,8 @@ def create_cfg_file(n_runs=1000, name='G4MScInThinLayerTest.mac'):
all runs, energies and limits.
"""
with open('G4MScInThinLayerTest.mac', 'w') as outfile:
outfile.write('/control/verbose 1\n' +
outfile.write('/control/cout/ignoreThreadsExcept 0\n' +
'/control/verbose 1\n' +
'/run/verbose 1\n' +
'/testem/det/setAbsMat Silicon\n' +
'/testem/det/setAbsThick 300 um\n' +
......
......@@ -57,7 +57,8 @@ ActionInitialization::~ActionInitialization()
void ActionInitialization::BuildForMaster() const
{
SetUserAction(new RunAction(fDetector));
// SetUserAction(new RunAction(fDetector));
SetUserAction(new RunAction(fDetector, new PrimaryGeneratorAction(fDetector), fRMSPlotter));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment