Bugfixes enabling buffer navigation
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHOMERManager.h
CommitLineData
a82a31af 1//-*- Mode: C++ -*-
2
d810d0de 3// $Id$
4// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
5
6/**************************************************************************
7 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
8 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
51346b82 9 * full copyright notice. *
d810d0de 10 **************************************************************************/
a15e6d7d 11
a82a31af 12#ifndef ALIEVEHOMERMANAGER_H
13#define ALIEVEHOMERMANAGER_H
059c30e4 14
15/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
16 * See cxx source for full Copyright notice */
17
d810d0de 18/** @file AliEveHOMERManager.h
33791895 19 @author Jochen Thaeder, Svein Lindal
51346b82 20 @date
33791895 21 @brief Manager for HOMER in HLT . Inherits some functionalitye
22 from AliHLTHOMERManager, mainly from TEveEventManager
059c30e4 23*/
33791895 24#include "AliHLTHOMERManager.h"
25#include <TEveEventManager.h>
26#include <TGeoManager.h>
27
28class AliEveHOMERSourceList;
29class TString;
30class TEveManager;
31class TEveScene;
32class TEveProjectionManager;
33class TTimer;
34
35class AliHLTEvePhos;
36class AliHLTEveEmcal;
37class AliHLTEveTPC;
38class AliHLTEveHLT;
39class AliHLTEveITS;
40class AliHLTEveISSD;
41class AliHLTEveISDD;
42class AliHLTEveISPD;
43class AliHLTEveTRD;
44class AliHLTEveAny;
45class AliHLTEveMuon;
46
47class AliEveHOMERManager : public TEveElementList, public AliHLTHOMERManager {
48
059c30e4 49public:
50
51 /*
52 * ---------------------------------------------------------------------------------
51346b82 53 * Constructor / Destructor
54 * ---------------------------------------------------------------------------------
059c30e4 55 */
56
46eadbb4 57 /** constructor */
a82a31af 58 AliEveHOMERManager();
46eadbb4 59
059c30e4 60 /** destructor */
d810d0de 61 virtual ~AliEveHOMERManager();
059c30e4 62
33791895 63 /** Connect to avahi and get the list for sources */
a82a31af 64 Int_t CreateEveSourcesList();
9e78371d 65
33791895 66 /** Keep on looking for sources until some are found */
9e78371d 67 Int_t CreateEveSourcesListLoop();
46eadbb4 68
33791895 69 /** Connect to the sources found */
703482d8 70 Int_t ConnectEVEtoHOMER(TString detector="ALL");
51346b82 71
33791895 72 /** Delete current connections to sources and reconnect */
73 Int_t ReConnectHOMER( TString detector="" );
9e78371d 74
33791895 75 /** Set the retry count for source list loop */
76 void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
77
3da168a7 78 /** Get next event from the readers */
33791895 79 Int_t NextHOMEREvent();
80
3da168a7 81 /** Process the event data */
82 Int_t ProcessEvent();
83
33791895 84 /** Set flag for event loop */
85 void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
86
87 /** Set flag for showing barrel */
88 void SetBarrelFlag(Bool_t flag) { fShowBarrel = flag;}
89 /** Set flag for showing muon arm */
90 void SetMuonFlag(Bool_t flag) { fShowMuon = flag;}
91
92 /**Set and get the global instance of the Eve manager */
93 void SetEveManager(TEveManager * manager) {fEveManager = manager;}
94 TEveManager * GetEveManager() const {return fEveManager;}
95
96 /**Set and get the global instance of TGeoManager */
97 void SetGeoManager(TGeoManager * manager) {fGeoManager = manager;}
98 TGeoManager * GetGeoManager() const {return fGeoManager;}
99
100 /** Set the projection scenes and their managers */
101 void SetRPhiManager (TEveProjectionManager * mgr) {fRPhiManager = mgr;}
102 void SetRPhiEventScene (TEveScene * scene ) {fRPhiEventScene = scene;}
103 void SetRhoZManager(TEveProjectionManager * mgr) {fRhoZManager = mgr;}
104 void SetRhoZEventScene(TEveScene * scene ) {fRhoZEventScene = scene;}
105
059c30e4 106
33791895 107 /** Start and stop the automatic event loop */
108 void StartLoop();
109 void StopLoop();
110
059c30e4 111private:
112
a82a31af 113 /** copy constructor prohibited */
114 AliEveHOMERManager(const AliEveHOMERManager&);
059c30e4 115
a82a31af 116 /** assignment operator prohibited */
117 AliEveHOMERManager& operator=(const AliEveHOMERManager&);
059c30e4 118
33791895 119 void DestroyDetectorElements();
120
121 /** Process block */
122 void ProcessBlock(AliHLTHOMERBlockDesc * block); //Process block
123 /** Reset the elements in the display */
124 void ResetDisplay();
125 /** Update the display */
126 void UpdateDisplay();
059c30e4 127
059c30e4 128 // == sources ==
33791895 129 AliEveHOMERSourceList* fSrcList; // List of Connected HOMER Sources
130
131 Int_t fRetryCount; //How many times to retry creating source list before giving up
132 Int_t fRetrySleeptime; //Sleep time between attempt at craeting source list
133
134 TGeoManager * fGeoManager; //The global TGeoManager instance
135 TEveManager * fEveManager; //The global TEveManager instance
136 TEveProjectionManager * fRPhiManager; //The R - Phi projection scene manager
137 TEveProjectionManager * fRhoZManager; //The Rho- Z projection sene manager
138 TEveScene * fRPhiEventScene; //The R - Phi projection scene
139 TEveScene * fRhoZEventScene; //The Rho - Z projection sene
140
141
142 TTimer * fTimer; //Timer for event loop
143 //TTimer * fSourceListTimer; //Timer for source list loop
144
145 AliHLTEvePhos * fPhosElement; //Phos eve processor
146 AliHLTEveEmcal * fEmcalElement; //Emcal eve processor
147 AliHLTEveTPC * fTPCElement; //TPC eve processor
148 AliHLTEveHLT * fHLTElement; //HLT
149 AliHLTEveITS * fITSElement; //ITS
150 AliHLTEveISPD * fISPDElement; //ISPD
151 AliHLTEveISSD * fISSDElement; //ISSD
152 AliHLTEveISDD * fISDDElement; //ISDD
153 AliHLTEveTRD * fTRDElement; //TRD
154 AliHLTEveMuon * fMuonElement; //MUON
155 AliHLTEveAny * fAnyElement; //Catch all
156
157 Bool_t fEventLoopStarted; // Flag indicating whether the loop is running
158 Bool_t fCenterProjectionsAtPrimaryVertex; // Flag indicating whether to center the projection scenes at primary vertex (as opposed to 0, 0, 0)
159 Bool_t fShowBarrel; // Display barrel detectors ?
160 Bool_t fShowMuon; // Display Muon arm ?
161
a82a31af 162 ClassDef(AliEveHOMERManager, 0); // Manage connections to HLT data-sources.
51346b82 163
a82a31af 164};
059c30e4 165#endif