]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveHLT/AliEveHLTEventManager.h
Add option to run on some local files with test mode using the alien plugin
[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 AliHLTEveMultCorr;
29 class AliEveEventBuffer;
30 class AliESDEvent;
31
32 class AliEveHLTEventManager : public TEveElementList { 
33
34 public:
35
36   ///Constructor
37   AliEveHLTEventManager();
38   
39   virtual ~AliEveHLTEventManager();
40
41
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   //* Show muon arm*//
64   void SetShowMuon(Bool_t showmuon) { fShowMuon = showmuon; }
65
66   /** Print the screens to a file **/
67   void PrintScreens();
68
69
70   virtual void NavigateBack() = 0;
71   virtual void NavigateFwd() = 0;
72
73
74
75   //Event buffer stuff
76   virtual void ConnectEventBuffer();  
77   virtual void StartBufferMonitor();
78   virtual void NextEvent() = 0;
79
80   virtual void SaveEveryThing();
81   
82  protected:
83
84   /** copy constructor prohibited */
85   AliEveHLTEventManager(const AliEveHLTEventManager&);
86
87   /** assignment operator prohibited */
88   AliEveHLTEventManager& operator=(const AliEveHLTEventManager&);
89
90   /** Process the event data */
91   Int_t ProcessEvent(TList * blockList);
92   Int_t ProcessEvent(AliESDEvent * event);
93
94   /** Set flag for event loop */
95   void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
96
97   void DestroyDetectorElements();
98   
99   virtual AliEveEventBuffer * GetEventBuffer() {return NULL;}
100   
101   /** Process block */
102   void ProcessBlock(AliHLTHOMERBlockDesc * block);  //Process block
103   /** Reset the elements in the display */
104   void ResetDisplay();  
105   /** Update the display  */
106   void UpdateDisplay(); 
107
108
109   Int_t GetRunNumber() const { return fRunNumber; }
110   ULong64_t GetEventId() const { return fEventId; }
111   void SetRunNumber(Int_t rn) { fRunNumber = rn; }
112   void SetEventId(ULong64_t id) { fEventId = id; }
113
114
115   void CreatePhosElement();
116   void CreateMultCorrElement();
117   void CreateEmcalElement();
118   void CreateTPCElement();
119   void CreateITSElement();
120   void CreateISPDElement();
121   void CreateISDDElement();
122   void CreateISSDElement();
123   void CreateTRDElement();
124   void CreateHLTElement();
125
126
127   TGeoManager * fGeoManager;              //The global TGeoManager instance
128   TEveManager * fEveManager;              //The global TEveManager instance
129   TEveProjectionManager * fRPhiManager;   //The R - Phi projection scene manager
130   TEveProjectionManager * fRhoZManager;   //The Rho- Z projection sene manager
131   TEveScene * fRPhiEventScene;            //The R - Phi projection scene
132   TEveScene * fRhoZEventScene;            //The Rho - Z projection sene
133   TEveViewer * fRhoZViewer;
134   TEveViewer * fRPhiViewer;
135   
136
137
138   TTimer * fTimer;                   //Timer for event loop
139   //TTimer * fSourceListTimer;       //Timer for source list loop
140  
141   AliHLTEvePhos  * fPhosElement;     //Phos eve processor
142   AliHLTEveEmcal * fEmcalElement;    //Emcal eve processor
143   AliHLTEveTPC   * fTPCElement;      //TPC eve processor
144   AliHLTEveHLT   * fHLTElement;      //HLT
145   AliHLTEveITS   * fITSElement;      //ITS
146   AliHLTEveISPD  * fISPDElement;     //ISPD
147   AliHLTEveISSD  * fISSDElement;     //ISSD
148   AliHLTEveISDD  * fISDDElement;     //ISDD
149   AliHLTEveTRD   * fTRDElement;      //TRD
150   AliHLTEveMuon  * fMuonElement;     //MUON
151   AliHLTEveMultCorr  * fMultCorrElement;     //Mult corr
152   AliHLTEveAny   * fAnyElement;      //Catch all
153
154
155
156   Bool_t fEventLoopStarted;                    // Flag indicating whether the loop is running
157   Bool_t fCenterProjectionsAtPrimaryVertex;    // Flag indicating whether to center the projection scenes at primary vertex (as opposed to 0, 0, 0)
158   Bool_t fShowBarrel;                               // Display barrel detectors ?
159   Bool_t fShowMuon;                                 // Display Muon arm ?
160
161   Int_t fRunNumber;
162   ULong64_t fEventId;
163
164   ClassDef(AliEveHLTEventManager, 0);
165
166 };
167
168 #endif