47 #include "DetectorConstruction.hh"
48 #include "ActionInitialization.hh"
49 #include "PrimaryGeneratorAction.hh"
51 #ifdef G4MULTITHREADED
69 G4cerr <<
" factory [-m macro ] [-p physList ] [-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" ) physListName = 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 ( ! physListName.size() ) {
135 char* physListNameEnv = getenv(
"PHYSLIST");
136 if ( physListNameEnv ) {
137 physListName =
G4String(physListNameEnv);
143 G4cerr <<
"Physics list " << physListName
144 <<
" is not available in PhysListFactory." <<
G4endl;
145 physListName.clear();
149 if ( ! physListName.size() ) {
150 physListName =
"FTFP_BERT";
172 if ( macro.size() ) {
174 G4String command =
"/control/execute ";
179 UImanager->
ApplyCommand(
"/control/execute init_vis.mac");
void SetNumberOfThreads(G4int n)
static G4UIterminal * session
G4int ApplyCommand(const char *aCommand)
G4bool IsReferencePhysList(const G4String &)
G4VModularPhysicsList * GetReferencePhysList(const G4String &)
static G4UImanager * GetUIpointer()
static G4int ConvertToInt(const char *st)
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.