64 #ifdef G4MULTITHREADED
68 #endif // G4MULTITHREADED
88 int main(
int argc,
char* argv[])
91 unsigned int numberOfThreads = 1;
94 G4String outputFileName =
"FF_Neutron_HP.out";
97 char makeFissionFragments[] =
"G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS";
98 char useWendtFission[] =
"G4NEUTRON_HP_USE_WENDT_FISSION_MODEL";
101 G4cout <<
"#### Starting: " << argv[0] <<
" ####" <<
G4endl;
105 if(getenv(makeFissionFragments) == NULL)
109 G4cerr <<
"!!!! The \"" << makeFissionFragments <<
"\" "
110 "environment variable is not set!" <<
G4endl;
111 G4cerr <<
"!!!! Please set it in order to use this example." <<
G4endl;
119 if(getenv(useWendtFission) == NULL)
122 G4cout <<
"!!!! Warning in example" << argv[0] <<
G4endl;
123 G4cout <<
"!!!! The \"" << useWendtFission <<
"\" "
124 "environment variable is not set!" <<
G4endl;
125 G4cout <<
"!!!! Please set it if you wish to use this fission model, "
126 "otherwise the default fission model will be used" <<
G4endl;
136 if(argv[i][0] !=
'-')
140 G4cerr <<
"!!!! A command-line option was expected, but \""
141 << argv[i] <<
"\" was found" <<
G4endl;
142 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate" <<
G4endl;
153 G4cerr <<
"!!!! An argument was expected, but \"" << argv[i + 1]
154 <<
"\" was found" <<
G4endl;
155 G4cerr <<
"!!!! Ensure that a space is used to separate the "
156 "option and argument" <<
G4endl;
157 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate" <<
G4endl;
166 scriptFileName =
"/control/execute ";
167 scriptFileName.
append(argv[i + 1]);
171 outputFileName = argv[i + 1];
175 result = sscanf(argv[i + 1],
182 G4cerr <<
"!!!! An positive number was expected, but \""
183 << argv[i + 1] <<
"\" was found" <<
G4endl;
184 G4cerr <<
"!!!! " << argv[0] <<
" will now terminate"
194 G4cout <<
"!!!! Warning for command " << i + 1 <<
G4endl;
195 G4cout <<
"!!!! \"" << argv[i] <<
"\" is not a valid command"
197 G4cout <<
"!!!! " << argv[0] <<
" will ignore \"" << argv[i]
198 <<
"\" and \"" << argv[i + 1] <<
"\"" <<
G4endl;
206 const G4long seed = 62737819;
210 G4Random::setTheEngine(
new CLHEP::MTwistEngine(seed));
214 #ifdef G4MULTITHREADED
220 G4cout <<
" Threads requested: " << numberOfThreads <<
G4endl;
226 #endif // G4MULTITHREADED
245 if(scriptFileName.length() != 0)
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
TQGSP_BIC_HP< G4VModularPhysicsList > QGSP_BIC_HP
void SetNumberOfThreads(G4int n)
static G4UImanager * GetUIpointer()
int main(int argc, char *argv[])
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfThreads() const
G4String & append(const G4String &)
virtual void Initialize()
Definition of the FFDetectorConstruction class.
G4int ApplyCommand(const char *aCommand)
Definition of the FFActionInitialization class.
G4GLOB_DLL std::ostream G4cerr