]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/ITSModuleStepper.h
Runloader is updated when moving to next file (quick fix).
[u/mrichter/AliRoot.git] / EVE / Alieve / ITSModuleStepper.h
1 // $Header$
2
3 #ifndef ALIEVE_ITSModuleStepper_H
4 #define ALIEVE_ITSModuleStepper_H
5
6 #include <TNamed.h>
7 #include <TAtt3D.h>
8 #include <TAttBBox.h>
9
10 #include <Reve/RenderElement.h>
11 #include <Reve/GridStepper.h>
12 #include <Reve/ZTrans.h>
13
14 #include <vector>
15
16 namespace Alieve {
17
18 class ITSDigitsInfo;
19 class DigitScaleInfo;
20
21 class ITSModuleStepper : public Reve::RenderElement, 
22                          public TNamed,
23                          public TAtt3D,
24                          public TAttBBox
25 {
26   friend class ITSModuleStepperGL;
27
28 public:
29   typedef std::vector<UInt_t>           vpInt_t;
30   typedef std::vector<UInt_t>::iterator vpInt_i;
31
32   enum PositionType_e { PT_BottomLeft, PT_BottomRight, PT_TopLeft, PT_TopRight };
33
34 private:
35   ITSModuleStepper(const ITSModuleStepper&);            // Not implemented
36   ITSModuleStepper& operator=(const ITSModuleStepper&); // Not implemented
37
38 protected:
39   ITSDigitsInfo*          fDigitsInfo;
40   DigitScaleInfo*         fScaleInfo;
41
42   Reve::GridStepper*      fStepper;  
43  
44   Float_t                 fExpand;
45
46   vpInt_t                 fIDs;
47   UInt_t                  fPosition;
48
49   Reve::ZTrans            fHMTrans; 
50
51   Bool_t                  fRnrFrame;    
52   PositionType_e          fWCorner; 
53   Color_t                 fWColor;   
54   Float_t                 fWWidth;
55   Float_t                 fWHeight;
56
57   void                    Apply();
58   Int_t                   Nxy(){ return fStepper->Nx*fStepper->Ny; }
59
60   void                    SetFirst(Int_t first);
61
62 public:
63   ITSModuleStepper(ITSDigitsInfo* di);
64   virtual ~ITSModuleStepper();
65
66   void   Start();
67   void   Next();
68   void   Previous();
69   void   End();
70
71   void   SetStepper(Int_t nx, Int_t ny, Float_t dx = -1, Float_t dy = -1);
72   Reve::GridStepper*  GetStepper(){ return fStepper; }
73   
74   void   AddToList( Int_t modID ){ fIDs.push_back(modID);}
75   void   ResetList(){ fIDs.clear();}
76
77   void   DisplayDet(Int_t det, Int_t layer = -1);
78   void   DisplayTheta(Float_t min, Float_t max);
79
80   Int_t  GetCurrentPage();
81   Int_t  GetPages();
82
83   virtual Bool_t CanEditMainColor() { return kTRUE; }
84
85   Bool_t  GetRnrFrame(){ return fRnrFrame; }
86   void    SetRnrFrame(Bool_t rnr){ fRnrFrame = rnr; }
87   Color_t GetWColor(){ return fWColor; };
88   void    SetWColor(Color_t c){ fWColor=c; }
89
90   virtual Reve::ZTrans* PtrMainHMTrans()     { return &fHMTrans; }
91
92   virtual void ComputeBBox();
93
94   virtual void Paint(Option_t* option = "");
95
96   ClassDef(ITSModuleStepper, 0);
97 };
98
99 } // Alieve namespace
100
101 #endif