Merge branch 'displayDevel'
[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;
bf1911d5 34class TEveViewer;
33791895 35
36class AliHLTEvePhos;
37class AliHLTEveEmcal;
38class AliHLTEveTPC;
39class AliHLTEveHLT;
40class AliHLTEveITS;
41class AliHLTEveISSD;
42class AliHLTEveISDD;
43class AliHLTEveISPD;
44class AliHLTEveTRD;
45class AliHLTEveAny;
46class AliHLTEveMuon;
47
48class AliEveHOMERManager : public TEveElementList, public AliHLTHOMERManager {
49
059c30e4 50public:
51
52 /*
53 * ---------------------------------------------------------------------------------
51346b82 54 * Constructor / Destructor
55 * ---------------------------------------------------------------------------------
059c30e4 56 */
57
46eadbb4 58 /** constructor */
a82a31af 59 AliEveHOMERManager();
46eadbb4 60
059c30e4 61 /** destructor */
d810d0de 62 virtual ~AliEveHOMERManager();
059c30e4 63
33791895 64 /** Connect to avahi and get the list for sources */
a82a31af 65 Int_t CreateEveSourcesList();
9e78371d 66
33791895 67 /** Keep on looking for sources until some are found */
9e78371d 68 Int_t CreateEveSourcesListLoop();
46eadbb4 69
33791895 70 /** Connect to the sources found */
703482d8 71 Int_t ConnectEVEtoHOMER(TString detector="ALL");
51346b82 72
33791895 73 /** Delete current connections to sources and reconnect */
74 Int_t ReConnectHOMER( TString detector="" );
9e78371d 75
33791895 76 /** Set the retry count for source list loop */
77 void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
78
3da168a7 79 /** Get next event from the readers */
33791895 80 Int_t NextHOMEREvent();
81
3da168a7 82 /** Process the event data */
83 Int_t ProcessEvent();
84
33791895 85 /** Set flag for event loop */
86 void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
87
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;}
92
93 /**Set and get the global instance of the Eve manager */
94 void SetEveManager(TEveManager * manager) {fEveManager = manager;}
95 TEveManager * GetEveManager() const {return fEveManager;}
96
97 /**Set and get the global instance of TGeoManager */
98 void SetGeoManager(TGeoManager * manager) {fGeoManager = manager;}
99 TGeoManager * GetGeoManager() const {return fGeoManager;}
100
101 /** Set the projection scenes and their managers */
102 void SetRPhiManager (TEveProjectionManager * mgr) {fRPhiManager = mgr;}
103 void SetRPhiEventScene (TEveScene * scene ) {fRPhiEventScene = scene;}
bf1911d5 104 void SetRPhiViewer(TEveViewer * viewer ) {fRPhiViewer = viewer;}
33791895 105 void SetRhoZManager(TEveProjectionManager * mgr) {fRhoZManager = mgr;}
106 void SetRhoZEventScene(TEveScene * scene ) {fRhoZEventScene = scene;}
bf1911d5 107 void SetRhoZViewer(TEveViewer * viewer ) {fRhoZViewer = viewer;}
059c30e4 108
33791895 109 /** Start and stop the automatic event loop */
110 void StartLoop();
111 void StopLoop();
bf1911d5 112
113 /** Print the screens to a file **/
114 void PrintScreens();
115
33791895 116
059c30e4 117private:
118
a82a31af 119 /** copy constructor prohibited */
120 AliEveHOMERManager(const AliEveHOMERManager&);
059c30e4 121
a82a31af 122 /** assignment operator prohibited */
123 AliEveHOMERManager& operator=(const AliEveHOMERManager&);
059c30e4 124
33791895 125 void DestroyDetectorElements();
126
127 /** Process block */
128 void ProcessBlock(AliHLTHOMERBlockDesc * block); //Process block
129 /** Reset the elements in the display */
130 void ResetDisplay();
131 /** Update the display */
132 void UpdateDisplay();
059c30e4 133
059c30e4 134 // == sources ==
33791895 135 AliEveHOMERSourceList* fSrcList; // List of Connected HOMER Sources
136
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
139
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
bf1911d5 146 TEveViewer * fRhoZViewer;
71614c9f 147 TEveViewer * fRPhiViewer;
bf1911d5 148
33791895 149
150
151 TTimer * fTimer; //Timer for event loop
152 //TTimer * fSourceListTimer; //Timer for source list loop
153
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
165
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 ?
170
a82a31af 171 ClassDef(AliEveHOMERManager, 0); // Manage connections to HLT data-sources.
51346b82 172
a82a31af 173};
059c30e4 174#endif