34 #ifdef G4MULTITHREADED
55 G4cerr <<
" exampleB4d [-m macro ] [-u UIsession] [-t nThreads]" <<
G4endl;
56 G4cerr <<
" note: -t option is available only for multi-threaded mode."
63 int main(
int argc,
char** argv)
74 #ifdef G4MULTITHREADED
77 for (
G4int i=1; i<argc; i=i+2 ) {
78 if (
G4String(argv[i]) ==
"-m" ) macro = argv[i+1];
79 else if (
G4String(argv[i]) ==
"-u" ) session = argv[i+1];
80 #ifdef G4MULTITHREADED
81 else if (
G4String(argv[i]) ==
"-t" ) {
94 if ( ! macro.size() ) {
100 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
104 #ifdef G4MULTITHREADED
106 if ( nThreads > 0 ) {
116 runManager->SetUserInitialization(detConstruction);
119 runManager->SetUserInitialization(physicsList);
122 runManager->SetUserInitialization(actionInitialization);
135 if ( macro.size() ) {
137 G4String command =
"/control/execute ";
138 UImanager->ApplyCommand(command+macro);
142 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
144 UImanager->ApplyCommand(
"/control/execute gui.mac");
void SetNumberOfThreads(G4int n)
int main(int argc, char **argv)
Action initialization class.
Detector construction class to define materials and geometry. The calorimeter is a box made of a give...
static G4UImanager * GetUIpointer()
Definition of the B4dActionInitialization class.
Definition of the B4dDetectorConstruction class.
static G4UIterminal * session
static G4int ConvertToInt(const char *st)
TFTFP_BERT< G4VModularPhysicsList > FTFP_BERT
G4GLOB_DLL std::ostream G4cerr