45 #ifdef G4MULTITHREADED
55 #include "CommandLineParser.hh"
56 #include "ActionInitialization.hh"
57 #include "DetectorConstruction.hh"
58 #include "PhysicsList.hh"
63 using namespace G4DNAPARSER;
66 void Parse(
int& argc,
char** argv);
68 int main(
int argc,
char** argv)
88 #ifdef G4MULTITHREADED
101 G4cout <<
"===== neuron is started with "
103 <<
" threads of MT MODE =====" <<
G4endl;
109 G4cout <<
"===== neuron is started with "
110 <<
" SEQUENTIAL MODE =====" <<
G4endl;
172 G4String command =
"/control/execute ";
188 G4cout <<
" Calculation time = "
204 std::string aux(argv[0]);
207 #if defined(_WIN32) || defined(WIN32)
208 int pos = aux.rfind(
'\\');
210 int pos = aux.rfind(
'/');
214 path = aux.substr(0, pos + 1);
215 executable = aux.substr(pos + 1);
220 void Parse(
int& argc,
char** argv)
225 parser = CommandLineParser::GetParser();
228 Command::OptionNotCompulsory,
229 "Select geant4 UI or just launch a geant4 terminal session",
234 "Give a mac file to execute",
243 #ifdef G4MULTITHREADED
246 "Launch in MT mode (events computed in parallel)",
247 " NOT RECOMMANDED WITH CHEMISTRY)",
252 "Initial beam position uniformly spread on a square!");
254 "Initial beam position uniformly spread on a disk!");
257 "Activate Livermore + DNAPhysics");
259 "Activate Livermore + DNAPhysics + DNAChemistry");
261 "Activate Hadronic + Livermore + DNAPhysics");
265 "Give a SWC file to simulation",
270 "Give a DAT file to simulation",
275 "Select a visualization driver",
279 Command::WithoutOption,
280 "Deactivate visualization when using GUI");
287 Command::OptionNotCompulsory,
298 CommandLineParser::DeleteInstance();
void Parse(int &argc, char **argv)
G4double GetRealElapsed() const
virtual const G4String & GetOption()
void SetNumberOfThreads(G4int n)
static const G4double pos
G4int ApplyCommand(const char *aCommand)
int Parse(int &argc, char **argv)
G4int G4GetNumberOfCores()
static G4UImanager * GetUIpointer()
G4int GetNumberOfThreads() const
static G4int ConvertToInt(const char *st)
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
Action initialization class.
CommandLineParser * parser(0)
int main(int argc, char **argv)
void GetNameAndPathOfExecutable(char **argv, G4String &executable, G4String &path)
Command * GetCommandIfActive(const G4String &marker)
G4GLOB_DLL std::ostream G4cout
bool CheckIfNotHandledOptionsExists(int &argc, char **argv)
void AddCommand(const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
virtual void Initialize()
Simple detector construction with a box volume placed in a world.