Main program of the persistency/P02 example.
More...
#include "G4Types.hh"
#include "ExP02DetectorConstruction.hh"
#include "ExP02DetConstrReader.hh"
#include "ExP02PrimaryGeneratorAction.hh"
#include "FTFP_BERT.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the persistency/P02 example.
Definition in file exampleP02.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 51 of file exampleP02.cc.
56 G4cout <<
"Please give 'write' or 'read' as argument " << G4endl;
60 G4VUserDetectorConstruction* det;
62 if(std::string(argv[1]) ==
"read")
64 det =
new ExP02DetConstrReader;
66 else if(std::string(argv[1]) ==
"write")
68 det =
new ExP02DetectorConstruction;
72 G4cout <<
"Wrong argument!" << G4endl;
77 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
80 G4RunManager * runManager =
new G4RunManager;
83 runManager->SetUserInitialization(det);
85 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
86 runManager->SetUserInitialization(physicsList);
89 G4VisManager* visManager =
new G4VisExecutive;
90 visManager->Initialize();
93 runManager->SetUserAction(
new ExP02PrimaryGeneratorAction());
96 runManager->Initialize();
99 G4UImanager * UImanager = G4UImanager::GetUIpointer();
101 UImanager->ApplyCommand(
"/control/execute vis.mac");