32 #include "B4Analysis.hh"
34 #ifdef G4MULTITHREADED
52 G4cerr <<
" exampleB4d [-m macro ] [-u UIsession] [-t nThreads]" <<
G4endl;
53 G4cerr <<
" note: -t option is available only for multi-threaded mode."
60 int main(
int argc,
char** argv)
71 #ifdef G4MULTITHREADED
74 for (
G4int i=1; i<argc; i=i+2 ) {
75 if (
G4String(argv[i]) ==
"-m" ) macro = argv[i+1];
76 else if (
G4String(argv[i]) ==
"-u" ) session = argv[i+1];
77 #ifdef G4MULTITHREADED
78 else if (
G4String(argv[i]) ==
"-t" ) {
91 if ( ! macro.size() ) {
101 #ifdef G4MULTITHREADED
103 if ( nThreads > 0 ) {
113 runManager->SetUserInitialization(detConstruction);
116 runManager->SetUserInitialization(physicsList);
119 runManager->SetUserInitialization(actionInitialization);
140 if ( macro.size() ) {
142 G4String command =
"/control/execute ";
143 UImanager->ApplyCommand(command+macro);
147 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
149 UImanager->ApplyCommand(
"/control/execute gui.mac");