]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveEMCALSModule.h
With Cesar: get AOD from AliEveEventManager; when called the first time, spawn your...
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveEMCALSModule.h
1 //*************************************************************************
2 // EMCAL event display
3 // Visualization of an EMCAL super module.
4 //
5 //  Author: Magali Estienne (magali.estienne@cern.ch)
6 //  June 30 2008
7 //*************************************************************************
8
9 #ifndef ALIEVEEMCALSMODULE_H
10 #define ALIEVEEMCALSMODULE_H
11
12 #include <TEveQuadSet.h>
13 #include <TEveElement.h>
14 #include <TEveBoxSet.h>
15 #include <TEveFrameBox.h>
16 #include <TEvePointSet.h>
17 #include <TClonesArray.h>
18 #include <TTree.h>
19
20 #include <TGedFrame.h>
21
22 class AliEveEMCALData;
23 class AliEveEMCALSModuleData;
24
25
26 class AliEveEMCALSModule : public TEveElement,
27                            public TNamed,
28                            public TAtt3D,
29                            public TAttBBox
30 {
31
32  public:
33   AliEveEMCALSModule(Int_t smodid, const Text_t* n, const Text_t* t);
34   ~AliEveEMCALSModule();
35
36   void DropData();
37
38   virtual void   ComputeBBox();
39   virtual UInt_t IncRTS()     { return ++fRTS; };
40   virtual Bool_t CanEditMainColor() const { return kTRUE; }
41
42   void  SetDataSource(AliEveEMCALData *data);
43   void  SetSModuleID(Int_t id);
44   void  SetFrameColor(Color_t col) { fFrameColor = col; IncRTS(); };
45   AliEveEMCALData* GetData() const { return fEMCALData; };
46   AliEveEMCALSModuleData* GetSModuleData() const;
47   Int_t GetID() const { return fSModuleID; };
48   void  SetThreshold(Short_t t);
49   void  SetMaxVal(Int_t mv);
50   void  SetClusterSize(Int_t size);
51   void  SetHitSize(Int_t size);
52
53   void UpdateQuads();
54
55  protected:
56   AliEveEMCALData         *fEMCALData;        //  Data for the current event
57   AliEveEMCALSModuleData  *fEMCALSModuleData; //  Data of Super Module (SM)
58   Color_t                 fFrameColor;        //  Main coloring
59   UInt_t                  fRTS;               //! Rendering Time Stamp
60   Int_t                   fSModuleID;         //  Id of super module, 0 to 11
61   TEveQuadSet             *fQuadSet;          //  Digit container
62   TEveQuadSet             *fQuadSet2;         //  Cluster container
63   TEvePointSet            *fPointSet;         //  Hit container
64   Short_t                 fThreshold;         //  Digit amplitude threshold
65   Int_t                   fMaxVal;            //  Digit amplitude maximum value
66   Int_t                   fClusterSize;       //  Cluster point size
67   Int_t                   fHitSize;           //  Hit point size
68   mutable UChar_t         *fColorArray;       //  Color-cache
69   Int_t                   fDebug;             //  Debug option
70
71   Float_t                 fSMBigBBox[3];      //  Bounding Box of full SM
72   Float_t                 fSMSmallBBox[3];    //  Bounding Box of half SM
73   Float_t                 fSMBBoxCenter[3];   //  Bounding Box Center of full SM
74
75   static   Bool_t          fStaticInit;        // Flag for static variable initialization.
76   static   TEveFrameBox    *fFrameBigBox;      // Frame box per full SM
77   static   TEveFrameBox    *fFrameSmallBox;    // Frame box per half SM
78   static   TEveRGBAPalette *fFrameDigPalette;  // Signal to color mapping for EMCAL digits
79   static   TEveRGBAPalette *fFrameCluPalette;  // Signal to color mapping for EMCAL clusters
80
81   void SetupColor(Int_t val, UChar_t* pix) const;
82
83   //****** Not used yet **************
84   void     ClearColorArray();
85   void     SetupColorArray() const;
86   UChar_t* ColorFromArray(Int_t val) const;
87   void     ColorFromArray(Int_t val, UChar_t* pix) const;
88   Int_t    ColorIndex(Int_t val) const;
89   //**********************************
90
91  private:
92   AliEveEMCALSModule(const AliEveEMCALSModule&);            
93   AliEveEMCALSModule& operator=(const AliEveEMCALSModule&); // Not implemented
94
95   ClassDef(AliEveEMCALSModule, 0); // Base class for TRD hits visualisation
96 };
97
98 #endif