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)
67 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
79 #ifdef G4MULTITHREADED
92 G4cout <<
"===== Microdosimetry is started with "
94 <<
" threads =====" <<
G4endl;
166 G4String command =
"/control/execute ";
171 UImanager->
ApplyCommand(
"/control/execute microdosimetry.in");
177 G4UIQt* UIQt =
static_cast<G4UIQt*
> (UImanager->
GetG4UIWindow());
179 UIQt->AddViewerTabFromFile(
"README",
"README from "+
G4String(argv[0]));
199 std::string aux(argv[0]);
202 #if defined(_WIN32) || defined(WIN32)
203 int pos = aux.rfind(
'\\');
205 int pos = aux.rfind(
'/');
209 path = aux.substr(0, pos + 1);
210 executable = aux.substr(pos + 1);
224 "Select geant4 UI or just launch a geant4 terminal session",
229 "Give a mac file to execute",
238 #ifdef G4MULTITHREADED
241 "Launch in MT mode (events computed in parallel)",
247 "Select a visualization driver",
252 "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)