]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTOFStrip.h
Fixes for report #71652 BAD_FREE reported by Coverity
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTOFStrip.h
1 #ifndef ALIEVETOFSTRIP_H
2 #define ALIEVETOFSTRIP_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 strip frame
16 //
17
18 #include <TEveQuadSet.h>
19
20 class TClonesArray;
21
22 class AliTOFGeometry;
23
24 class AliEveTOFStrip : public TEveQuadSet
25 {
26 public:
27
28   virtual void InitModule();
29   virtual void SetTrans();
30
31   AliEveTOFStrip(const Text_t* n="AliEveTOFStrip", const Text_t* t=0);
32   AliEveTOFStrip(TGeoManager *localGeoManager,
33                  Int_t nSector, Int_t nPlate, Int_t nStrip);
34
35   AliEveTOFStrip(TGeoManager *localGeoManager,
36                  Int_t nSector, Int_t nPlate, Int_t nStrip,
37                  TClonesArray *tofArray);
38   virtual ~AliEveTOFStrip();
39
40   void SetThreshold(Short_t t);
41   void SetMaxVal(Int_t mv);
42   Short_t GetThreshold() const { return fThreshold; }
43   Int_t   GetMaxVal()    const { return fMaxVal; }
44   virtual void DigitSelected(Int_t idx);
45
46 protected:
47   static Bool_t    fgStaticInitDone; // Has initialization of static variables been done.
48   static void      InitStatics();    // Initialize static variables.
49
50   static TEveFrameBox    *fgTOFstripFrameBox; // Shared box-frame for all strips.
51   static TEveRGBAPalette *fgTOFstripPalette;  // Shared palette.
52
53 private:
54   void LoadQuads();
55
56   AliEveTOFStrip(const AliEveTOFStrip&);            // Not implemented
57   AliEveTOFStrip& operator=(const AliEveTOFStrip&); // Not implemented
58
59
60   AliTOFGeometry *fTOFgeometry; // pointer to TOF geometry
61
62   TClonesArray   *fTOFarray;    // pointer to TOF digits array
63
64   Short_t fThreshold; // threshold to cut on visualization
65   Int_t   fMaxVal;    // max value to cut on visualization
66   Int_t   fSector;    // TOF sector index
67   Int_t   fPlate;     // TOF module index
68   Int_t   fStrip;     // TOF strip index
69
70   Float_t fDx;    // x position of TOF digit (in TOF strip RF)
71   Float_t fDz;    // z position of TOF digit (in TOF strip RF)
72
73   TGeoManager *fGeoManager; // pointer to the ALICE geometry
74
75   ClassDef(AliEveTOFStrip, 0); // Representation of a TOF strip.
76 };
77 #endif