]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/EVE/AliHLTEveBase.h
HLTqadm
[u/mrichter/AliRoot.git] / HLT / EVE / AliHLTEveBase.h
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                               *
8
9 /// @file   AliHLTEveBase.h
10 /// @author Svein Lindal <slindal@fys.uio.no>
11 /// @brief  Base class for the HLT eve display elements
12
13 #include "Rtypes.h"
14 #include "TString.h"
15 #include "TEveElement.h"
16 class AliHLTHOMERBlockDesc;
17 class AliEveHLTEventManager;
18 class TCanvas;
19
20
21 class AliHLTEveBase : public TEveElementList {
22
23 public:
24   
25   /** Default constructor prohibited **/
26   AliHLTEveBase(const char * name);
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
40   /** Set the parent AliEveHLTEventManager instance */
41   void SetEventManager(AliEveHLTEventManager * em) { fEventManager = em; };
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
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
62   
63   AliEveHLTEventManager * fEventManager; //Pointer to AliEveHLTEventManager instance
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
70   /** Default constructor prohibited **/
71   AliHLTEveBase();
72   /** copy constructor prohibited */
73   AliHLTEveBase(const AliHLTEveBase&);
74   /** assignment operator prohibited */
75   AliHLTEveBase& operator=(const AliHLTEveBase&);
76
77   Int_t fMaxHistos;  // Maximum number histograms there is room for. 
78
79   TString fDetector;  //String denoting the detector
80
81   ClassDef(AliHLTEveBase, 0);
82 };
83
84 #endif