38 #ifdef G4MULTITHREADED
50 #include "ActionInitialization.hh"
51 #include "DetectorConstruction.hh"
52 #include "PhysicsList.hh"
53 #include "CommandLineParser.hh"
61 void Parse(
int& argc,
char** argv);
63 int main(
int argc,
char** argv)
66 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
78 #ifdef G4MULTITHREADED
91 G4cout <<
"===== Microdosimetry is started with "
93 <<
" threads =====" <<
G4endl;
165 G4String command =
"/control/execute ";
170 UImanager->
ApplyCommand(
"/control/execute microdosimetry.in");
176 G4UIQt* UIQt =
static_cast<G4UIQt*
> (UImanager->
GetG4UIWindow());
178 UIQt->AddViewerTabFromFile(
"README",
"README from "+
G4String(argv[0]));
198 std::string aux(argv[0]);
201 #if defined(_WIN32) || defined(WIN32)
202 int pos = aux.rfind(
'\\');
204 int pos = aux.rfind(
'/');
208 path = aux.substr(0, pos + 1);
209 executable = aux.substr(pos + 1);
223 "Select geant4 UI or just launch a geant4 terminal session",
228 "Give a mac file to execute",
237 #ifdef G4MULTITHREADED
240 "Launch in MT mode (events computed in parallel)",
246 "Select a visualization driver",
251 "Deactivate visualization when using GUI");
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
int Parse(int &argc, char **argv)
void SetNumberOfThreads(G4int n)
void AddCommand(const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
Command * GetCommandIfActive(const G4String &marker)
bool CheckIfNotHandledOptionsExists(int &argc, char **argv)
static CommandLineParser * GetParser()
static void DeleteInstance()
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
G4int G4GetNumberOfCores()
G4int GetNumberOfThreads() const
static G4int ConvertToInt(const char *st)
void Parse(int &argc, char **argv)
Action initialization class.
void GetNameAndPathOfExecutable(char **argv, G4String &executable, G4String &path)
G4UIsession * GetG4UIWindow() const
virtual void Initialize()
Detector construction class to demonstrate various ways of placement.
CommandLineParser * parser(0)
virtual const G4String & GetOption()
int main(int argc, char **argv)
static const G4double pos
G4int ApplyCommand(const char *aCommand)