]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTOFSector.h
-Fixed bug in offline buffer that deleted event object.
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTOFSector.h
1 #ifndef ALIEVETOFSECTOR_H
2 #define ALIEVETOFSECTOR_H
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 // $Id$
11 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
12
13 //
14 // Class to visualize the TOF digit information
15 // in TOF sector frame
16 //
17
18 #include <TEveQuadSet.h>
19
20 class TTree;
21
22 class TClonesArray;
23 class TGeoManager;
24
25 class TEveFrameBox;
26 class TEveRGBAPalette;
27 class TEveElement;
28
29 class AliTOFGeometry;
30  
31 class AliEveTOFSector : public TEveQuadSet
32 {
33 public:
34   AliEveTOFSector(const Text_t* n="AliEveTOFSector", const Text_t* t=0);
35   AliEveTOFSector(TGeoManager *localGeoManager, Int_t nSector);
36     
37   AliEveTOFSector(TGeoManager *localGeoManager, Int_t nSector,
38                   TClonesArray *tofArray);
39   AliEveTOFSector(TGeoManager *localGeoManager,
40                   Int_t nSector, TTree *tofTree);
41   virtual ~AliEveTOFSector();
42
43   virtual void InitModule();
44   virtual void SetTrans(); 
45
46   static void      InitStatics();
47
48   void SetSectorID(Int_t id);
49   void SetAutoTrans(Bool_t r){fAutoTrans=r;};
50   void SetThreshold(Short_t t);
51   void SetMaxVal(Int_t mv);
52   Bool_t GetPlate(Int_t nPlate) const {return fPlateFlag[nPlate];};
53   Short_t GetThreshold() const {return fThreshold;};
54   Int_t GetMaxVal() const {return fMaxVal;};
55   Bool_t GetAutoTrans() const {return fAutoTrans;};
56   Int_t GetSectorID() const {return fSectorID;};
57   virtual void DigitSelected(Int_t idx);
58   ///////////////////////////////////////////
59
60   void SetPlate(Int_t nPlate, Bool_t r);
61
62 protected:
63
64   static Bool_t           fgStaticInitDone;    // flag to check on/off inizialization
65   static TEveFrameBox    *fgTOFsectorFrameBox; // EVE container for TOF sector
66   static TEveRGBAPalette *fgTOFsectorPalette;  // EVE container for setting of visualization parameters
67  
68   AliTOFGeometry *fTOFgeometry; // pointer to the TOF geometry container class
69
70   TClonesArray   *fTOFarray;    // TOF digit array container
71   TTree          *fTOFtree;     // TOF digit tree container
72
73   Int_t fSector;     // TOF sector index
74   //Int_t fPlate;
75   //Int_t fStrip;
76
77   Float_t  fDx;     // x position of TOF digit (in TOF strip RF)
78   Float_t  fDy;     // y position of TOF digit (in TOF strip RF)
79   Float_t  fDz;     // z position of TOF digit (in TOF strip RF)
80   ///////////////////////////////
81
82   Bool_t      fAutoTrans; // to choose if visualize the TOF sector in ALICE RF or in local RF
83   //Int_t       fMinTime;     
84   //Int_t       fMaxTime;
85   Short_t     fThreshold; // threshold to cut on visualization
86   Int_t       fMaxVal;    // max value to cut on visualization
87   Int_t       fSectorID;  // TOF sector identifier
88   Bool_t     *fPlateFlag; // flag to switch on/off the TOF module visualization inside a TOF SM
89
90   //Bool_t      fPlateFlag0;
91   //Bool_t      fPlateFlag1;
92   //Bool_t      fPlateFlag2;
93   //Bool_t      fPlateFlag3;
94   //Bool_t      fPlateFlag4;
95
96   //Color_t     fFrameColor;
97   //Bool_t      fRnrFrame;
98
99   TGeoManager *fGeoManager; // pointer to the ALICE geometry
100
101 private:
102   void LoadQuads();
103
104   AliEveTOFSector(const AliEveTOFSector&);            // Not implemented
105   AliEveTOFSector& operator=(const AliEveTOFSector&); // Not implemented
106
107   ClassDef(AliEveTOFSector, 0); // Representation of a TOF sector.
108 };
109 #endif