]>
Commit | Line | Data |
---|---|---|
d4741ff3 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | #ifndef ALIHLTEVEBASE_H | |
4 | #define ALIHLTEVEBASE_H | |
5 | //* This file is property of and copyright by the ALICE HLT Project * | |
6 | //* ALICE Experiment at CERN, All rights reserved. * | |
7 | //* See cxx source for full Copyright notice * | |
33791895 | 8 | |
9 | /// @file AliHLTEveBase.h | |
d4741ff3 | 10 | /// @author Svein Lindal <slindal@fys.uio.no> |
33791895 | 11 | /// @brief Base class for the HLT eve display elements |
12 | ||
33791895 | 13 | #include "Rtypes.h" |
3d600a8b | 14 | #include "TString.h" |
fd2adb88 | 15 | #include "TEveElement.h" |
33791895 | 16 | class AliHLTHOMERBlockDesc; |
fd2adb88 | 17 | class AliEveHLTEventManager; |
33791895 | 18 | class TCanvas; |
3d600a8b | 19 | |
33791895 | 20 | |
fd2adb88 | 21 | class AliHLTEveBase : public TEveElementList { |
33791895 | 22 | |
23 | public: | |
24 | ||
25 | /** Default constructor prohibited **/ | |
fd2adb88 | 26 | AliHLTEveBase(const char * name); |
33791895 | 27 | |
28 | /** Destructor **/ | |
29 | virtual ~AliHLTEveBase(); | |
30 | ||
31 | /** Process the incoming blocks, must be implemented by children */ | |
32 | virtual void ProcessBlock(AliHLTHOMERBlockDesc * block) = 0; | |
33 | ||
34 | /** Update the elements after new event loaded, to be implemented by children */ | |
35 | virtual void UpdateElements() = 0; | |
36 | ||
37 | /** Reset the elements before reading in new event, to be implemented by children */ | |
38 | virtual void ResetElements() = 0; | |
39 | ||
fd2adb88 | 40 | /** Set the parent AliEveHLTEventManager instance */ |
41 | void SetEventManager(AliEveHLTEventManager * em) { fEventManager = em; }; | |
33791895 | 42 | |
43 | ||
44 | ||
45 | protected: | |
46 | ||
47 | /** Create a new canvas tab */ | |
48 | TCanvas * CreateCanvas(TString tabTitle, TString canvasTitle ); | |
49 | ||
50 | /** Addhistograms to the canvas */ | |
51 | virtual void AddHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount ); | |
52 | ||
3d600a8b | 53 | |
54 | /// Getters and setters for the max number of histograms | |
55 | void SetMaxHistograms(Int_t mh) {fMaxHistos = mh;} | |
56 | Int_t GetMaxHistograms() const {return fMaxHistos;} | |
57 | ||
58 | ///Getter and setter for the detector string | |
59 | void SetDetector(TString det) {fDetector = det;} | |
60 | TString GetDetector() const {return fDetector;} | |
61 | ||
33791895 | 62 | |
fd2adb88 | 63 | AliEveHLTEventManager * fEventManager; //Pointer to AliEveHLTEventManager instance |
33791895 | 64 | TCanvas * fCanvas; //Canvas for histograms |
65 | Int_t fHistoCount; //Counter for histograms, to track where to draw the next one | |
66 | ||
67 | ||
68 | private: | |
69 | ||
fd2adb88 | 70 | /** Default constructor prohibited **/ |
71 | AliHLTEveBase(); | |
33791895 | 72 | /** copy constructor prohibited */ |
73 | AliHLTEveBase(const AliHLTEveBase&); | |
74 | /** assignment operator prohibited */ | |
75 | AliHLTEveBase& operator=(const AliHLTEveBase&); | |
76 | ||
3d600a8b | 77 | Int_t fMaxHistos; // Maximum number histograms there is room for. |
78 | ||
79 | TString fDetector; //String denoting the detector | |
80 | ||
33791895 | 81 | ClassDef(AliHLTEveBase, 0); |
82 | }; | |
83 | ||
84 | #endif |