Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
phantom.cc File Reference
#include <stdexcept>
#include "globals.hh"
#include "G4UImanager.hh"
#include "G4UIsession.hh"
#include "G4TransportationManager.hh"
#include "G4HumanPhantomConstruction.hh"
#include "G4HumanPhantomPhysicsList.hh"
#include "G4HumanPhantomActionInitialization.hh"
#include "G4RunManager.hh"
Include dependency graph for phantom.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 61 of file phantom.cc.

62 {
63 #ifdef G4MULTITHREADED
64  G4MTRunManager* runManager = new G4MTRunManager;
65  runManager->SetNumberOfThreads(4); // Is equal to 2 by default
66 #else
67  G4RunManager* runManager = new G4RunManager;
68 #endif
69 
70  // Set mandatory initialization classes
72  runManager->SetUserInitialization(userPhantom);
73 
75 
76 #ifdef G4VIS_USE
77  G4VisManager* visManager = new G4VisExecutive;
78  visManager->Initialize();
79 #endif
80 
81 
83  runManager->SetUserInitialization(actions);
84 
85 
87 
88  if (argc==1) // Define UI session for interactive mode.
89  {
90 #ifdef G4UI_USE
91  G4cout << " UI session starts ..." << G4endl;
92  G4UIExecutive* ui = new G4UIExecutive(argc, argv);
93  UImanager->ApplyCommand("/control/execute default.mac");
94  ui->SessionStart();
95  delete ui;
96 #endif
97  }
98  else // Batch mode
99  {
100  G4String command = "/control/execute ";
101  G4String fileName = argv[1];
102  UImanager -> ApplyCommand(command+fileName);
103  }
104 
105  // job termination
106 #ifdef G4VIS_USE
107  delete visManager;
108 #endif
109 
110 delete runManager;
111 
112 return 0;
113 }
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
void SetNumberOfThreads(G4int n)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
G4GLOB_DLL std::ostream G4cout
void Initialize()
#define G4endl
Definition: G4ios.hh:61
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function: