Main program of the persistency/P01 example.
More...
#include "G4Types.hh"
#include "ExP01DetectorConstruction.hh"
#include "ExP01PrimaryGeneratorAction.hh"
#include "ExP01RunAction.hh"
#include "ExP01EventAction.hh"
#include "ExP01SteppingAction.hh"
#include "ExP01SteppingVerbose.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/P01 example.
Definition in file exampleP01.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 54 of file exampleP01.cc.
57 G4UIExecutive* ui =
nullptr;
59 ui =
new G4UIExecutive(argc, argv);
63 G4VSteppingVerbose::SetInstance(
new ExP01SteppingVerbose);
66 G4RunManager * runManager =
new G4RunManager;
69 ExP01DetectorConstruction* ExP01detector =
new ExP01DetectorConstruction;
70 runManager->SetUserInitialization(ExP01detector);
72 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
73 runManager->SetUserInitialization(physicsList);
76 G4VisManager* visManager =
new G4VisExecutive;
77 visManager->Initialize();
80 runManager->SetUserAction(
new ExP01PrimaryGeneratorAction(ExP01detector));
81 runManager->SetUserAction(
new ExP01RunAction);
82 runManager->SetUserAction(
new ExP01EventAction);
83 runManager->SetUserAction(
new ExP01SteppingAction);
86 runManager->Initialize();
89 G4UImanager * UImanager = G4UImanager::GetUIpointer();
94 UImanager->ApplyCommand(
"/control/execute vis.mac");
101 G4String command =
"/control/execute ";
103 UImanager->ApplyCommand(command+fileName);