34 #ifdef G4MULTITHREADED 35 #include "G4MTRunManager.hh" 37 #include "G4RunManager.hh" 40 #include "G4UImanager.hh" 43 #include "G4VisExecutive.hh" 47 #include "G4UIExecutive.hh" 50 #include "GeometryConstruction.hh" 52 #include "ActionInitialization.hh" 56 int main(
int argc,
char** argv) {
59 #ifdef G4MULTITHREADED 60 G4MTRunManager * runManager =
new G4MTRunManager;
61 G4int nThreads = G4Threading::G4GetNumberOfCores();
62 if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
63 runManager->SetNumberOfThreads(nThreads);
65 G4RunManager * runManager =
new G4RunManager;
69 GeometryConstruction* detector =
new GeometryConstruction;
70 runManager->SetUserInitialization(detector);
73 runManager->SetUserInitialization(
new ActionInitialization);
77 G4VisManager* visManager =
new G4VisExecutive;
78 visManager->Initialize();
82 G4UImanager* UImanager = G4UImanager::GetUIpointer();
86 G4String command =
"/control/execute ";
88 UImanager->ApplyCommand(command+fileName);
93 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
95 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)