46 #include "DetectorConstruction.hh"
47 #include "ActionInitialization.hh"
48 #include "PrimaryGeneratorAction.hh"
50 #ifdef G4MULTITHREADED
68 G4cerr <<
" factory [-m macro ] [-p physListMacro ] [-u UIsession] [-t nThreads]" <<
G4endl;
69 G4cerr <<
" note: -t option is available only for multi-threaded mode." <<
G4endl;
76 int main(
int argc,
char** argv)
89 #ifdef G4MULTITHREADED
92 for (
G4int i=1; i<argc; i=i+2 ) {
93 if (
G4String(argv[i]) ==
"-m" ) macro = argv[i+1];
94 else if (
G4String(argv[i]) ==
"-u" ) session = argv[i+1];
95 else if (
G4String(argv[i]) ==
"-p" ) physListMacro = argv[i+1];
96 #ifdef G4MULTITHREADED
97 else if (
G4String(argv[i]) ==
"-t" ) {
110 if ( ! macro.size() ) {
118 #ifdef G4MULTITHREADED
120 if ( nofThreads > 0 ) {
132 if ( physListMacro.size() ) {
135 UImanager->
ApplyCommand(
"/control/execute "+physListMacro);
139 std::vector<G4String>* myConstructors =
new std::vector<G4String>;
141 myConstructors->push_back(
"G4EmStandardPhysics");
142 myConstructors->push_back(
"G4EmExtraPhysics");
143 myConstructors->push_back(
"G4DecayPhysics");
144 myConstructors->push_back(
"G4HadronElasticPhysics");
145 myConstructors->push_back(
"G4HadronPhysicsFTFP_BERT");
146 myConstructors->push_back(
"G4StoppingPhysics");
147 myConstructors->push_back(
"G4IonPhysics");
148 myConstructors->push_back(
"G4NeutronTrackingCut");
166 if ( macro.size() ) {
168 G4String command =
"/control/execute ";
173 UImanager->
ApplyCommand(
"/control/execute init_vis.mac");