]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4RunManager.h
Format() method added; changed Print() - usage of Format()
[u/mrichter/AliRoot.git] / TGeant4 / TG4RunManager.h
CommitLineData
2817d3e2 1// $Id$
2// Category: run
3//
e5967ab3 4// Author: I. Hrivnacova
5//
6// Class TG4RunManager
7// -------------------
2817d3e2 8// Geant4 implementation of the MonteCarlo interface methods
e5967ab3 9// for access to Geant4 at run level.
10// It provides also methods for switching between Geant4 and
11// Root UIs.
2817d3e2 12
13#ifndef TG4_RUN_MANAGER_H
14#define TG4_RUN_MANAGER_H
15
5b6ecd36 16#include "TG4Verbose.h"
e5967ab3 17#include "TG4RunMessenger.h"
18
2817d3e2 19#include <globals.hh>
20
21#include <Rtypes.h>
22
23class AliMC;
24
25class TG4VRunConfiguration;
2817d3e2 26
27class G4RunManager;
28class G4UIsession;
29
30class TApplication;
31
5b6ecd36 32class TG4RunManager : public TG4Verbose
2817d3e2 33{
34 public:
35 TG4RunManager(TG4VRunConfiguration* configuration, int argc, char** argv);
36 TG4RunManager(TG4VRunConfiguration* configuration);
37 // --> protected
38 // TG4RunManager();
39 // TG4RunManager(const TG4RunManager& right);
40 virtual ~TG4RunManager();
41
42 // static access method
43 static TG4RunManager* Instance();
44
45 // methods
46 void Initialize();
e5967ab3 47 void LateInitialize();
2817d3e2 48 void ProcessEvent();
49 void ProcessRun(G4int nofEvents);
50
51 // get methods
52 Int_t CurrentEvent() const;
53
54 //
55 // methods for Geant4 only
56 //
57 void StartGeantUI();
58 void StartRootUI();
59 void ProcessGeantMacro(G4String macroName);
60 void ProcessRootMacro(G4String macroName);
61 void ProcessGeantCommand(G4String command);
62 void ProcessRootCommand(G4String command);
63 void UseG3Defaults();
64
65
66 protected:
67 TG4RunManager();
68 TG4RunManager(const TG4RunManager& right);
69
70 // operators
71 TG4RunManager& operator=(const TG4RunManager& right);
72
73 // data members
2817d3e2 74
75 private:
76 // methods
77 void CreateGeantUI();
78 void CreateRootUI();
79 Text_t* G4StringToTextT(G4String string) const;
80
81 // static data members
82 static TG4RunManager* fgInstance; //this instance
83
84 // data members
e5967ab3 85 G4RunManager* fRunManager; //G4RunManager
86 TG4RunMessenger fMessenger; //messenger
2817d3e2 87 TG4VRunConfiguration* fRunConfiguration; //TG4VRunConfiguration
88 G4UIsession* fGeantUISession; //G4 UI
89 TApplication* fRootUISession; //Root UI
90 G4bool fRootUIOwner; //ownership of Root UI
91 G4int fARGC; //argc
92 char** fARGV; //argv
93};
94
95// inline methods
96inline TG4RunManager* TG4RunManager::Instance()
97{ return fgInstance; }
98
99#endif //TG4_RUN_MANAGER_H
100