2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 **************************************************************************/
10 #ifndef AliEveITSModuleStepper_H
11 #define AliEveITSModuleStepper_H
13 #include <TEveElement.h>
14 #include <TEveGridStepper.h>
16 #include <TGLOverlay.h>
23 class AliEveITSDigitsInfo;
24 class AliEveDigitScaleInfo;
26 class AliEveITSModuleStepper : public TEveElementList,
27 public TGLOverlayElement
29 friend class ITSModuleStepperGL;
33 typedef std::vector<UInt_t> vpInt_t;
34 typedef std::vector<UInt_t>::iterator vpInt_i;
37 AliEveITSModuleStepper(AliEveITSDigitsInfo* di);
38 virtual ~AliEveITSModuleStepper();
41 void DisplayDet(Int_t det, Int_t layer = -1);
42 void DisplayTheta(Float_t min, Float_t max);
45 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
46 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
48 virtual void MouseLeave();
49 virtual void Render(TGLRnrCtx& rnrCtx);
52 TEveGridStepper* GetStepper() { return fStepper; }
53 void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
55 Int_t GetCurrentPage() const;
65 Color_t GetWColor() const { return fWCol; }
66 void SetWColor(Color_t c) { fWCol = c; }
67 TGLText* GetFont() { return fText; }
68 void SetGLText(TGLText* t) { fText = t; }
73 AliEveITSDigitsInfo *fDigitsInfo; // Source of data and geometry.
74 AliEveDigitScaleInfo *fScaleInfo; // Parameters for digit-scaling.
75 Int_t fSubDet; // Sub-det, 0~SPD, 1~SDD, 2~SSD.
77 TEveGridStepper *fStepper; // Module placement.
78 TGLAxis *fAxis; // Axis of color scale.
79 TGLText *fText; // GL text-output object.
80 Float_t fTextSize; // Overlay text size.
84 // module configuration
85 Float_t fExpandCell; //
86 Color_t fModuleFrameCol; //
88 // palette configuratiom
89 Float_t fPaletteOffset; //
90 Float_t fPaletteLength; //
92 // symbol configuration
96 Float_t fWOff; // Offset relative to widget size.
98 Color_t fWActiveCol; //
102 Float_t TextLength(const char* txt);
103 void RenderString(TString tex ,Int_t id = -1);
104 void RenderFrame(Float_t dx, Float_t dy, Int_t id);
105 void RenderSymbol(Float_t dx, Float_t dy, Int_t id);
106 void RenderPalette(Float_t dx, Float_t x, Float_t y);
108 void RenderCellIDs();
110 // module ID navigation
111 Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
112 void AddToList(Int_t modID) { fIDs.push_back(modID);}
113 void ResetList() { fIDs.clear();}
114 void SetFirst(Int_t first);
117 vpInt_t fIDs; // Vector of module IDs to be displayed.
118 UInt_t fPosition; // Position of top corner ITS module in vector fIDs.
120 AliEveITSModuleStepper(const AliEveITSModuleStepper&); // Not implemented
121 AliEveITSModuleStepper& operator=(const AliEveITSModuleStepper&); // Not implemented
123 ClassDef(AliEveITSModuleStepper, 0); // Display scaled ITS modules in a paged layout, also providing GL-overaly control GUI.