Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayTel.cc File Reference
Include dependency graph for XrayTel.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 99 of file XrayTel.cc.

100 {
101  // Construct the default run manager
102 #ifdef G4MULTITHREADED
103  G4MTRunManager* runManager = new G4MTRunManager;
104 #else
105  G4RunManager* runManager = new G4RunManager;
106 #endif
107 
108  // set mandatory initialization classes
110  runManager->SetUserInitialization(new XrayTelPhysicsList);
112 
113 #ifdef G4VIS_USE
114  // visualization manager
115  G4VisManager* visManager = new G4VisExecutive;
116  visManager->Initialize();
117 #endif
118 
119  //Initialize G4 kernel
120  runManager->Initialize();
121 
122  // get the pointer to the User Interface manager
123  G4UImanager *UImanager = G4UImanager::GetUIpointer();
124  if ( argc==1 ){
125 #ifdef G4UI_USE
126  G4UIExecutive* ui = new G4UIExecutive(argc, argv);
127 #ifdef G4VIS_USE
128  UImanager->ApplyCommand("/control/execute vis.mac");
129 #endif
130  ui->SessionStart();
131  delete ui;
132 #endif
133  }
134  else {
135  // Create a pointer to the User Interface manager
136  G4String command = "/control/execute ";
137  for (int i=2; i<=argc; i++) {
138  G4String macroFileName = argv[i-1];
139  UImanager->ApplyCommand(command+macroFileName);
140  }
141  }
142 
143  // job termination
144 #ifdef G4VIS_USE
145  delete visManager;
146 #endif
147  delete runManager;
148  return 0;
149 }
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
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: