Main program of the eventgenerator/exgps example.
More...
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "GeometryConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the eventgenerator/exgps example.
Definition in file exgps.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 56 of file exgps.cc.
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");