Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE01.cc File Reference

Main program of the runAndEvent/RE01 example. More...

Include dependency graph for RE01.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Main program of the runAndEvent/RE01 example.

Definition in file RE01.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 66 of file RE01.cc.

67 {
68 #ifdef G4MULTITHREADED
69  G4MTRunManager * runManager = new G4MTRunManager;
70  //runManager->SetNumberOfThreads(4);
71 #else
72  G4RunManager * runManager = new G4RunManager;
73 #endif
74 
75 #ifdef G4VIS_USE
76  // Visualization manager construction
77  G4VisManager* visManager = new G4VisExecutive;
78  visManager->Initialize();
79 #endif
80 
81  G4String parallelWorldName = "ReadoutWorld";
84  detector->RegisterParallelWorld(
85  new RE01CalorimeterROGeometry(parallelWorldName));
86  runManager->SetUserInitialization(detector);
87 
88  G4VModularPhysicsList* physicsList = new QGSP_BERT;
89  physicsList->RegisterPhysics(new G4UnknownDecayPhysics);
90  physicsList->RegisterPhysics(
91  new G4ParallelWorldPhysics(parallelWorldName));
92  runManager->SetUserInitialization(physicsList);
93 
94  runManager->SetUserInitialization(
96 
97  runManager->Initialize();
98 
99  if(argc==1)
100  {
101 #ifdef G4UI_USE
102  G4UIExecutive* ui = new G4UIExecutive(argc, argv);
103  ui->SessionStart();
104  delete ui;
105 #endif
106  }
107  else
108  {
109  G4UImanager* UImanager = G4UImanager::GetUIpointer();
110  G4String command = "/control/execute ";
111  G4String fileName = argv[1];
112  UImanager->ApplyCommand(command+fileName);
113  }
114 
115 #ifdef G4VIS_USE
116  delete visManager;
117 #endif
118 
119  delete runManager;
120 
121  return 0;
122 }
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
TQGSP_BERT< G4VModularPhysicsList > QGSP_BERT
Definition: QGSP_BERT.hh:63
void RegisterPhysics(G4VPhysicsConstructor *)
void RegisterParallelWorld(G4VUserParallelWorld *)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void Initialize()
virtual void Initialize()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function: