64 #ifdef G4MULTITHREADED
68 #endif // G4MULTITHREADED
83 int main(
int argc,
char* argv[])
86 unsigned int numberOfThreads = 1;
89 G4String outputFileName =
"FF_Neutron_HP.out";
92 char makeFissionFragments[] =
"G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS";
93 char useWendtFission[] =
"G4NEUTRON_HP_USE_WENDT_FISSION_MODEL";
95 char Force[] =
"G4FORCENUMBEROFTHREADS";
96 if(getenv(Force) != NULL) {
97 char doNotForce[]=
"G4FORCENUMBEROFTHREADS=1";
102 G4cout <<
"#### Starting: " << argv[0] <<
" ####" <<
G4endl;
106 if(getenv(makeFissionFragments) == NULL)
110 G4cerr <<
"!!!! The \"" << makeFissionFragments <<
"\" "
111 "environment variable is not set!" <<
G4endl;
112 G4cerr <<
"!!!! Please set it in order to use this example." <<
G4endl;
120 if(getenv(useWendtFission) == NULL)
123 G4cout <<
"!!!! Warning in example" << argv[0] <<
G4endl;
124 G4cout <<
"!!!! The \"" << useWendtFission <<
"\" "
125 "environment variable is not set!" <<
G4endl;
126 G4cout <<
"!!!! Please set it if you wish to use this fission model, "
127 "otherwise the default fission model will be used" <<
G4endl;
137 if(argv[i][0] !=
'-')
141 G4cerr <<
"!!!! A command-line option was expected, but \""
142 << argv[i] <<
"\" was found" <<
G4endl;
143 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate" <<
G4endl;
154 G4cerr <<
"!!!! An argument was expected, but \"" << argv[i + 1]
155 <<
"\" was found" <<
G4endl;
156 G4cerr <<
"!!!! Ensure that a space is used to separate the "
157 "option and argument" <<
G4endl;
158 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate" <<
G4endl;
167 scriptFileName =
"/control/execute ";
168 scriptFileName.
append(argv[i + 1]);
172 outputFileName = argv[i + 1];
176 result = sscanf(argv[i + 1],
183 G4cerr <<
"!!!! An positive number was expected, but \""
184 << argv[i + 1] <<
"\" was found" <<
G4endl;
185 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate"
195 G4cout <<
"!!!! Warning for command " << i + 1 <<
G4endl;
196 G4cout <<
"!!!! \"" << argv[i] <<
"\" is not a valid command"
198 G4cout <<
"!!!! " << argv[0] <<
" will ignore \"" << argv[i]
199 <<
"\" and \"" << argv[i + 1] <<
"\"" <<
G4endl;
206 if (scriptFileName.length() == 0) {
221 #ifdef G4MULTITHREADED
227 G4cout <<
" Threads requested: " << numberOfThreads <<
G4endl;
233 #endif // G4MULTITHREADED
void SetNumberOfThreads(G4int n)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
G4int GetNumberOfThreads() const
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
int main(int argc, char **argv)
G4GLOB_DLL std::ostream G4cerr
G4double G4ParticleHPJENDLHEData::G4double result
TQGSP_BIC_HP< G4VModularPhysicsList > QGSP_BIC_HP
G4GLOB_DLL std::ostream G4cout
Definition of the FFDetectorConstruction class.
G4String & append(const G4String &)
Definition of the FFActionInitialization class.
virtual void Initialize()