4 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
6 /**************************************************************************
7 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
8 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
9 * full copyright notice. *
10 **************************************************************************/
12 #ifndef ALIEVEHOMERMANAGER_H
13 #define ALIEVEHOMERMANAGER_H
15 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
16 * See cxx source for full Copyright notice */
18 /** @file AliEveHOMERManager.h
19 @author Jochen Thaeder, Svein Lindal
21 @brief Manager for HOMER in HLT . Inherits some functionalitye
22 from AliHLTHOMERManager, mainly from TEveEventManager
24 #include "AliHLTHOMERManager.h"
25 #include <TEveEventManager.h>
26 #include <TGeoManager.h>
28 class AliEveHOMERSourceList;
32 class TEveProjectionManager;
48 class AliEveHOMERManager : public TEveElementList, public AliHLTHOMERManager {
53 * ---------------------------------------------------------------------------------
54 * Constructor / Destructor
55 * ---------------------------------------------------------------------------------
62 virtual ~AliEveHOMERManager();
64 /** Connect to avahi and get the list for sources */
65 Int_t CreateEveSourcesList();
67 /** Keep on looking for sources until some are found */
68 Int_t CreateEveSourcesListLoop();
70 /** Connect to the sources found */
71 Int_t ConnectEVEtoHOMER(TString detector="ALL");
73 /** Delete current connections to sources and reconnect */
74 Int_t ReConnectHOMER( TString detector="" );
76 /** Set the retry count for source list loop */
77 void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
79 /** Get next event from the readers */
80 Int_t NextHOMEREvent();
82 /** Process the event data */
85 /** Set flag for event loop */
86 void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
88 /** Set flag for showing barrel */
89 void SetBarrelFlag(Bool_t flag) { fShowBarrel = flag;}
90 /** Set flag for showing muon arm */
91 void SetMuonFlag(Bool_t flag) { fShowMuon = flag;}
93 /**Set and get the global instance of the Eve manager */
94 void SetEveManager(TEveManager * manager) {fEveManager = manager;}
95 TEveManager * GetEveManager() const {return fEveManager;}
97 /**Set and get the global instance of TGeoManager */
98 void SetGeoManager(TGeoManager * manager) {fGeoManager = manager;}
99 TGeoManager * GetGeoManager() const {return fGeoManager;}
101 /** Set the projection scenes and their managers */
102 void SetRPhiManager (TEveProjectionManager * mgr) {fRPhiManager = mgr;}
103 void SetRPhiEventScene (TEveScene * scene ) {fRPhiEventScene = scene;}
104 void SetRPhiViewer(TEveViewer * viewer ) {fRPhiViewer = viewer;}
105 void SetRhoZManager(TEveProjectionManager * mgr) {fRhoZManager = mgr;}
106 void SetRhoZEventScene(TEveScene * scene ) {fRhoZEventScene = scene;}
107 void SetRhoZViewer(TEveViewer * viewer ) {fRhoZViewer = viewer;}
109 /** Start and stop the automatic event loop */
113 /** Print the screens to a file **/
119 /** copy constructor prohibited */
120 AliEveHOMERManager(const AliEveHOMERManager&);
122 /** assignment operator prohibited */
123 AliEveHOMERManager& operator=(const AliEveHOMERManager&);
125 void DestroyDetectorElements();
128 void ProcessBlock(AliHLTHOMERBlockDesc * block); //Process block
129 /** Reset the elements in the display */
131 /** Update the display */
132 void UpdateDisplay();
135 AliEveHOMERSourceList* fSrcList; // List of Connected HOMER Sources
137 Int_t fRetryCount; //How many times to retry creating source list before giving up
138 Int_t fRetrySleeptime; //Sleep time between attempt at craeting source list
140 TGeoManager * fGeoManager; //The global TGeoManager instance
141 TEveManager * fEveManager; //The global TEveManager instance
142 TEveProjectionManager * fRPhiManager; //The R - Phi projection scene manager
143 TEveProjectionManager * fRhoZManager; //The Rho- Z projection sene manager
144 TEveScene * fRPhiEventScene; //The R - Phi projection scene
145 TEveScene * fRhoZEventScene; //The Rho - Z projection sene
146 TEveViewer * fRPhiViewer;
147 TEveViewer * fRhoZViewer;
151 TTimer * fTimer; //Timer for event loop
152 //TTimer * fSourceListTimer; //Timer for source list loop
154 AliHLTEvePhos * fPhosElement; //Phos eve processor
155 AliHLTEveEmcal * fEmcalElement; //Emcal eve processor
156 AliHLTEveTPC * fTPCElement; //TPC eve processor
157 AliHLTEveHLT * fHLTElement; //HLT
158 AliHLTEveITS * fITSElement; //ITS
159 AliHLTEveISPD * fISPDElement; //ISPD
160 AliHLTEveISSD * fISSDElement; //ISSD
161 AliHLTEveISDD * fISDDElement; //ISDD
162 AliHLTEveTRD * fTRDElement; //TRD
163 AliHLTEveMuon * fMuonElement; //MUON
164 AliHLTEveAny * fAnyElement; //Catch all
166 Bool_t fEventLoopStarted; // Flag indicating whether the loop is running
167 Bool_t fCenterProjectionsAtPrimaryVertex; // Flag indicating whether to center the projection scenes at primary vertex (as opposed to 0, 0, 0)
168 Bool_t fShowBarrel; // Display barrel detectors ?
169 Bool_t fShowMuon; // Display Muon arm ?
171 ClassDef(AliEveHOMERManager, 0); // Manage connections to HLT data-sources.