]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveHLT/AliEveHLTEventManager.h
Merge branch 'multipleThreads' into newdevel
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHLTEventManager.h
1 #ifndef ALIEVEHLTEVENTMANAGER_H
2 #define ALIEVEHLTEVENTMANAGER_H
3
4
5 #include "TEveEventManager.h"
6 #include "AliHLTLoggingVariadicFree.h"
7
8 class AliHLTHOMERBlockDesc;
9 class TList;
10
11 class TEveManager;
12 class TEveScene;
13 class TEveProjectionManager;
14 class TTimer;
15 class TEveViewer;
16
17 class AliHLTEvePhos;
18 class AliHLTEveEmcal;
19 class AliHLTEveTPC;
20 class AliHLTEveHLT;
21 class AliHLTEveITS;
22 class AliHLTEveISSD;
23 class AliHLTEveISDD;
24 class AliHLTEveISPD;
25 class AliHLTEveTRD;
26 class AliHLTEveAny;
27 class AliHLTEveMuon;
28 class AliEveEventBuffer;
29 class AliESDEvent;
30
31 class AliEveHLTEventManager : public TEveElementList { 
32
33 public:
34
35   ///Constructor
36   AliEveHLTEventManager();
37   
38   virtual ~AliEveHLTEventManager();
39
40
41   void SetRunNumber(Int_t rn) { fRunNumber = rn; }
42
43   /**Set and get the global instance of the Eve manager */
44   void SetEveManager(TEveManager * manager) {fEveManager = manager;}
45   TEveManager * GetEveManager() const {return fEveManager;}
46
47   /**Set and get the global instance of TGeoManager */
48   void SetGeoManager(TGeoManager * manager) {fGeoManager = manager;}
49   TGeoManager * GetGeoManager() const {return fGeoManager;}
50
51   /** Set the projection scenes and their managers */
52   void SetRPhiManager (TEveProjectionManager * mgr) {fRPhiManager = mgr;}
53   void SetRPhiEventScene (TEveScene * scene ) {fRPhiEventScene = scene;}
54   void SetRPhiViewer(TEveViewer * viewer ) {fRPhiViewer = viewer;}
55   void SetRhoZManager(TEveProjectionManager * mgr) {fRhoZManager = mgr;}
56   void SetRhoZEventScene(TEveScene * scene ) {fRhoZEventScene = scene;}
57   void SetRhoZViewer(TEveViewer * viewer ) {fRhoZViewer = viewer;}
58
59   /** Start and stop the automatic event loop */
60   void StartLoop();
61   void StopLoop();
62
63   /** Print the screens to a file **/
64   void PrintScreens();
65
66
67   virtual void NavigateBack() = 0;
68   virtual void NavigateFwd() = 0;
69
70
71
72   //Event buffer stuff
73   virtual void ConnectEventBuffer();  
74   virtual void StartBufferMonitor();
75   virtual void NextEvent() = 0;
76
77   virtual void SaveEveryThing();
78   
79  protected:
80
81   /** copy constructor prohibited */
82   AliEveHLTEventManager(const AliEveHLTEventManager&);
83
84   /** assignment operator prohibited */
85   AliEveHLTEventManager& operator=(const AliEveHLTEventManager&);
86
87   /** Process the event data */
88   Int_t ProcessEvent(TList * blockList);
89   Int_t ProcessEvent(AliESDEvent * event);
90
91   /** Set flag for event loop */
92   void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
93
94   void DestroyDetectorElements();
95   
96   virtual AliEveEventBuffer * GetEventBuffer() {return NULL;}
97   
98   /** Process block */
99   void ProcessBlock(AliHLTHOMERBlockDesc * block);  //Process block
100   /** Reset the elements in the display */
101   void ResetDisplay();  
102   /** Update the display  */
103   void UpdateDisplay(); 
104
105
106   void CreatePhosElement();
107   void CreateEmcalElement();
108   void CreateTPCElement();
109   void CreateITSElement();
110   void CreateISPDElement();
111   void CreateISDDElement();
112   void CreateISSDElement();
113   void CreateTRDElement();
114   void CreateHLTElement();
115
116
117   TGeoManager * fGeoManager;              //The global TGeoManager instance
118   TEveManager * fEveManager;              //The global TEveManager instance
119   TEveProjectionManager * fRPhiManager;   //The R - Phi projection scene manager
120   TEveProjectionManager * fRhoZManager;   //The Rho- Z projection sene manager
121   TEveScene * fRPhiEventScene;            //The R - Phi projection scene
122   TEveScene * fRhoZEventScene;            //The Rho - Z projection sene
123   TEveViewer * fRhoZViewer;
124   TEveViewer * fRPhiViewer;
125   
126
127
128   TTimer * fTimer;                   //Timer for event loop
129   //TTimer * fSourceListTimer;       //Timer for source list loop
130  
131   AliHLTEvePhos  * fPhosElement;     //Phos eve processor
132   AliHLTEveEmcal * fEmcalElement;    //Emcal eve processor
133   AliHLTEveTPC   * fTPCElement;      //TPC eve processor
134   AliHLTEveHLT   * fHLTElement;      //HLT
135   AliHLTEveITS   * fITSElement;      //ITS
136   AliHLTEveISPD  * fISPDElement;     //ISPD
137   AliHLTEveISSD  * fISSDElement;     //ISSD
138   AliHLTEveISDD  * fISDDElement;     //ISDD
139   AliHLTEveTRD   * fTRDElement;      //TRD
140   AliHLTEveMuon  * fMuonElement;     //MUON
141   AliHLTEveAny   * fAnyElement;      //Catch all
142
143
144
145   Bool_t fEventLoopStarted;                    // Flag indicating whether the loop is running
146   Bool_t fCenterProjectionsAtPrimaryVertex;    // Flag indicating whether to center the projection scenes at primary vertex (as opposed to 0, 0, 0)
147   Bool_t fShowBarrel;                               // Display barrel detectors ?
148   Bool_t fShowMuon;                                 // Display Muon arm ?
149
150   Int_t fRunNumber;
151
152   ClassDef(AliEveHLTEventManager, 0);
153
154 };
155
156 #endif