4 // Author: I. Hrivnacova
8 // Geant4 implementation of the MonteCarlo interface methods
9 // for access to Geant4 at run level.
10 // It provides also methods for switching between Geant4 and
13 #ifndef TG4_RUN_MANAGER_H
14 #define TG4_RUN_MANAGER_H
16 #include "TG4RunMessenger.h"
24 class TG4VRunConfiguration;
34 TG4RunManager(TG4VRunConfiguration* configuration, int argc, char** argv);
35 TG4RunManager(TG4VRunConfiguration* configuration);
38 // TG4RunManager(const TG4RunManager& right);
39 virtual ~TG4RunManager();
41 // static access method
42 static TG4RunManager* Instance();
46 void LateInitialize();
48 void ProcessRun(G4int nofEvents);
51 Int_t CurrentEvent() const;
54 // methods for Geant4 only
58 void ProcessGeantMacro(G4String macroName);
59 void ProcessRootMacro(G4String macroName);
60 void ProcessGeantCommand(G4String command);
61 void ProcessRootCommand(G4String command);
67 TG4RunManager(const TG4RunManager& right);
70 TG4RunManager& operator=(const TG4RunManager& right);
78 Text_t* G4StringToTextT(G4String string) const;
80 // static data members
81 static TG4RunManager* fgInstance; //this instance
84 G4RunManager* fRunManager; //G4RunManager
85 TG4RunMessenger fMessenger; //messenger
86 TG4VRunConfiguration* fRunConfiguration; //TG4VRunConfiguration
87 G4UIsession* fGeantUISession; //G4 UI
88 TApplication* fRootUISession; //Root UI
89 G4bool fRootUIOwner; //ownership of Root UI
95 inline TG4RunManager* TG4RunManager::Instance()
96 { return fgInstance; }
98 #endif //TG4_RUN_MANAGER_H