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