46 #include "DetectorConstruction.hh"
47 #include "ActionInitialization.hh"
48 #include "PrimaryGeneratorAction.hh"
50 #ifdef G4MULTITHREADED
68 G4cerr <<
" factory [-m macro ] [-p physList ] [-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" ) physListName = 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 ( ! physListName.size() ) {
134 char* physListNameEnv = std::getenv(
"PHYSLIST");
135 if ( physListNameEnv ) {
136 physListName =
G4String(physListNameEnv);
142 G4cerr <<
"Physics list " << physListName
143 <<
" is not available in PhysListFactory." <<
G4endl;
144 physListName.clear();
148 if ( ! physListName.size() ) {
149 physListName =
"FTFP_BERT";
171 if ( macro.size() ) {
173 G4String command =
"/control/execute ";
178 UImanager->
ApplyCommand(
"/control/execute init_vis.mac");