Main program of the analysis/AnaEx03 example.
More...
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "FTFP_BERT.hh"
#include "DetectorConstruction.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "EventAction.hh"
#include "SteppingAction.hh"
#include "HistoManager.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 analysis/AnaEx03 example.
Definition in file AnaEx03.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 51 of file AnaEx03.cc.
55 G4UIExecutive* ui = 0;
57 ui =
new G4UIExecutive(argc, argv);
62 G4RunManager * runManager =
new G4RunManager;
67 runManager->SetUserInitialization(detector);
69 runManager->SetUserInitialization(
new FTFP_BERT);
73 HistoManager* histo =
new HistoManager();
79 runManager->SetUserAction(gen_action);
82 runManager->SetUserAction(run_action);
84 EventAction* event_action =
new EventAction(run_action,histo);
85 runManager->SetUserAction(event_action);
87 SteppingAction* stepping_action =
88 new SteppingAction(detector, event_action);
89 runManager->SetUserAction(stepping_action);
93 runManager->Initialize();
97 G4VisManager* visManager =
new G4VisExecutive;
98 visManager->Initialize();
102 G4UImanager* UImanager = G4UImanager::GetUIpointer();
106 G4String command =
"/control/execute ";
108 UImanager->ApplyCommand(command+fileName);
112 UImanager->ApplyCommand(
"/control/execute init_vis.mac");