30 #include "B4DetectorConstruction.hh"
33 #ifdef G4MULTITHREADED
53 G4cerr <<
" exampleB4a [-m macro ] [-u UIsession] [-t nThreads]" <<
G4endl;
54 G4cerr <<
" note: -t option is available only for multi-threaded mode."
61 int main(
int argc,
char** argv)
72 #ifdef G4MULTITHREADED
75 for (
G4int i=1; i<argc; i=i+2 ) {
76 if (
G4String(argv[i]) ==
"-m" ) macro = argv[i+1];
77 else if (
G4String(argv[i]) ==
"-u" ) session = argv[i+1];
78 #ifdef G4MULTITHREADED
79 else if (
G4String(argv[i]) ==
"-t" ) {
92 if ( ! macro.size() ) {
102 #ifdef G4MULTITHREADED
104 if ( nThreads > 0 ) {
114 runManager->SetUserInitialization(detConstruction);
117 runManager->SetUserInitialization(physicsList);
120 runManager->SetUserInitialization(actionInitialization);
134 if ( macro.size() ) {
136 G4String command =
"/control/execute ";
137 UImanager->ApplyCommand(command+macro);
141 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
143 UImanager->ApplyCommand(
"/control/execute gui.mac");