47 #include "DetectorConstruction.hh"
48 #include "ActionInitialization.hh"
49 #include "PrimaryGeneratorAction.hh"
51 #ifdef G4MULTITHREADED
69 G4cerr <<
" factory [-m macro ] [-p physListMacro ] [-u UIsession] [-t nThreads]" <<
G4endl;
70 G4cerr <<
" note: -t option is available only for multi-threaded mode." <<
G4endl;
77 int main(
int argc,
char** argv)
90 #ifdef G4MULTITHREADED
93 for (
G4int i=1; i<argc; i=i+2 ) {
94 if (
G4String(argv[i]) ==
"-m" ) macro = argv[i+1];
95 else if (
G4String(argv[i]) ==
"-u" ) session = argv[i+1];
96 else if (
G4String(argv[i]) ==
"-p" ) physListMacro = argv[i+1];
97 #ifdef G4MULTITHREADED
98 else if (
G4String(argv[i]) ==
"-t" ) {
111 if ( ! macro.size() ) {
119 #ifdef G4MULTITHREADED
121 if ( nofThreads > 0 ) {
133 if ( physListMacro.size() ) {
136 UImanager->
ApplyCommand(
"/control/execute "+physListMacro);
140 std::vector<G4String>* myConstructors =
new std::vector<G4String>;
142 myConstructors->push_back(
"G4EmStandardPhysics");
143 myConstructors->push_back(
"G4EmExtraPhysics");
144 myConstructors->push_back(
"G4DecayPhysics");
145 myConstructors->push_back(
"G4HadronElasticPhysics");
146 myConstructors->push_back(
"G4HadronPhysicsFTFP_BERT");
147 myConstructors->push_back(
"G4StoppingPhysics");
148 myConstructors->push_back(
"G4IonPhysics");
149 myConstructors->push_back(
"G4NeutronTrackingCut");
167 if ( macro.size() ) {
169 G4String command =
"/control/execute ";
174 UImanager->
ApplyCommand(
"/control/execute init_vis.mac");
void SetNumberOfThreads(G4int n)
static G4UIterminal * session
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
static G4int ConvertToInt(const char *st)
TG4GenericPhysicsList< G4VModularPhysicsList > G4GenericPhysicsList
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
Action initialization class.
int main(int argc, char **argv)
G4GLOB_DLL std::ostream G4cerr
Simple detector construction with a box volume placed in a world.