#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
#include "G4RunManager.hh"
#include "G4DNAChemistryManager.hh"
#include "G4UImanager.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
#include "CommandLineParser.hh"
Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 71 of file chem1.cc.
83 #ifdef G4MULTITHREADED 88 if(commandLine->GetOption() ==
"NMAX")
96 G4cout <<
"===== Chem1 is started with " 98 <<
" threads =====" <<
G4endl;
130 ui =
new G4UIExecutive(argc, argv, commandLine->GetOption());
132 if (ui->IsGUI()) UImanager->
ApplyCommand(
"/control/execute gui.mac");
141 G4String(
"/vis/open ") + commandLine->GetOption());
159 G4String(
"/vis/open ") + commandLine->GetOption());
166 G4String command =
"/control/execute ";
167 UImanager->
ApplyCommand(command + commandLine->GetOption());
188 CommandLineParser::DeleteInstance();
void Parse(int &argc, char **argv)
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
void SetNumberOfThreads(G4int n)
Command * GetCommandIfActive(const G4String &marker)
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
G4int G4GetNumberOfCores()
CommandLineParser * parser(0)
G4int GetNumberOfThreads() const
static G4int ConvertToInt(const char *st)
virtual void Initialize()
Detector construction class to define materials and geometry.
G4int ApplyCommand(const char *aCommand)
◆ Parse()
void Parse |
( |
int & |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 193 of file chem1.cc.
198 parser = CommandLineParser::GetParser();
201 "-gui", Command::OptionNotCompulsory,
202 "Select geant4 UI or just launch a geant4 terminal session",
"qt");
204 parser->
AddCommand(
"-mac", Command::WithOption,
"Give a mac file to execute",
213 #ifdef G4MULTITHREADED 216 "Launch in MT mode (events computed in parallel," 217 " NOT RECOMMANDED WITH CHEMISTRY)",
"2");
221 "Deactivate chemistry");
224 "Select a visualization driver",
"OGL 600x600-0+0");
227 "Deactivate visualization when using GUI");
236 CommandLineParser::DeleteInstance();
int Parse(int &argc, char **argv)
void AddCommand(const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
bool CheckIfNotHandledOptionsExists(int &argc, char **argv)
CommandLineParser * parser(0)
◆ parser()