10 #include "PackageInfo.hh"
19 #include "lcdd/util/StringUtil.hh"
20 #include "lcdd/core/LCDDDetectorConstruction.hh"
23 #include "G4ApplicationState.hh"
24 #include "G4StateManager.hh"
25 #include "G4VisExecutive.hh"
26 #include "G4UIExecutive.hh"
31 Module(
"SlicApplication", false), m_appMessenger(0), m_runManager(0), m_mode(
SlicApplication::eBatch), m_returnCode(0), m_isInitialized(false), m_geant4VersionString(0) {
78 m_ui =
new G4UIExecutive(argc, argv);
115 log().
warning(
"Call to SlicApplication::initialize() was ignored. SLIC is already initialized!");
121 G4VisExecutive* vis =
new G4VisExecutive();
130 m_runManager->SetUserInitialization(
new LCDDDetectorConstruction());
154 std::string::size_type sidx =
m_binaryname.find_last_of(
'/');
155 if (sidx != std::string::npos) {
166 G4RunManager::GetRunManager()->AbortRun(abort);
185 log().
verbose(
"Printing the Geant4 command queue ...");
193 log().
verbose(
"Starting interactive session ...");
194 m_ui->SessionStart();
206 log() <<
LOG::always <<
" Application : " << PackageInfo::getFullName() <<
" (" << PackageInfo::getShortName() <<
")" <<
LOG::done;
static CommandLineProcessor * instance()
Command line processor for SLIC that uses getopt.
void process(int argc, char **argv)
A queue of G4 commands to be executed in order.
Base class for slic code modules that provides common functionality, such as logging to an output str...
Extension of G4RunManager.
G4UImessenger for the SLIC application.
Singleton class for a Geant4 application.
void setMode(ERunMode rmode)
RunManager * getRunManager()
int getReturnCode() const
RunManager * m_runManager
SlicApplicationMessenger * m_appMessenger
std::string m_binarybasename
const std::string & getBinaryName() const
const char * getErrorCodeString(unsigned int errorCode)
virtual ~SlicApplication()
void setAborting(bool a=true)
void setReturnCode(int rc)
const std::string & getBinaryBasename() const
This is the G4UImessenger for the VRML2Writer class.