Main program of the analysis/AnaEx02 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/AnaEx02 example.
Definition in file AnaEx02.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 52 of file AnaEx02.cc.
56 G4UIExecutive* ui = 0;
58 ui =
new G4UIExecutive(argc, argv);
63 G4RunManager * runManager =
new G4RunManager;
68 runManager->SetUserInitialization(detector);
70 runManager->SetUserInitialization(
new FTFP_BERT);
74 HistoManager* histo =
new HistoManager();
80 runManager->SetUserAction(gen_action);
83 runManager->SetUserAction(run_action);
85 EventAction* event_action =
new EventAction(run_action,histo);
86 runManager->SetUserAction(event_action);
88 SteppingAction* stepping_action =
89 new SteppingAction(detector, event_action);
90 runManager->SetUserAction(stepping_action);
94 runManager->Initialize();
98 G4VisManager* visManager =
new G4VisExecutive;
99 visManager->Initialize();
103 G4UImanager* UImanager = G4UImanager::GetUIpointer();
107 G4String command =
"/control/execute ";
109 UImanager->ApplyCommand(command+fileName);
113 UImanager->ApplyCommand(
"/control/execute init_vis.mac");