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 "TG4Verbose.h"
17 #include "TG4RunMessenger.h"
25 class TG4VRunConfiguration;
32 class TG4RunManager : public TG4Verbose
35 TG4RunManager(TG4VRunConfiguration* configuration, int argc, char** argv);
36 TG4RunManager(TG4VRunConfiguration* configuration);
39 // TG4RunManager(const TG4RunManager& right);
40 virtual ~TG4RunManager();
42 // static access method
43 static TG4RunManager* Instance();
47 void LateInitialize();
49 void ProcessRun(G4int nofEvents);
52 Int_t CurrentEvent() const;
55 // methods for Geant4 only
59 void ProcessGeantMacro(G4String macroName);
60 void ProcessRootMacro(G4String macroName);
61 void ProcessGeantCommand(G4String command);
62 void ProcessRootCommand(G4String command);
68 TG4RunManager(const TG4RunManager& right);
71 TG4RunManager& operator=(const TG4RunManager& right);
79 Text_t* G4StringToTextT(G4String string) const;
81 // static data members
82 static TG4RunManager* fgInstance; //this instance
85 G4RunManager* fRunManager; //G4RunManager
86 TG4RunMessenger fMessenger; //messenger
87 TG4VRunConfiguration* fRunConfiguration; //TG4VRunConfiguration
88 G4UIsession* fGeantUISession; //G4 UI
89 TApplication* fRootUISession; //Root UI
90 G4bool fRootUIOwner; //ownership of Root UI
96 inline TG4RunManager* TG4RunManager::Instance()
97 { return fgInstance; }
99 #endif //TG4_RUN_MANAGER_H