]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveDet/AliEveITSModuleStepper.h
Fixes for inconsistent types in BinarySearch
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveITSModuleStepper.h
CommitLineData
d810d0de 1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
82b3616d 9
10#ifndef ALIEVE_ITSModuleStepper_H
11#define ALIEVE_ITSModuleStepper_H
12
09edeb17 13#include <TNamed.h>
32e219c2 14#include <TGLOverlay.h>
09edeb17 15
84aff7a4 16#include <TEveElement.h>
17#include <TEveGridStepper.h>
82b3616d 18
19#include <vector>
20
32e219c2 21class TGLText;
22class TGLAxis;
23
d810d0de 24class AliEveITSDigitsInfo;
25class AliEveDigitScaleInfo;
82b3616d 26
d810d0de 27class AliEveITSModuleStepper : public TEveElementList,
c76ea574 28 public TGLOverlayElement
82b3616d 29{
09edeb17 30 friend class ITSModuleStepperGL;
31
82b3616d 32public:
09edeb17 33 typedef std::vector<UInt_t> vpInt_t;
34 typedef std::vector<UInt_t>::iterator vpInt_i;
d7e36bcf 35
82b3616d 36private:
698e2c9b 37 vpInt_t fIDs; // Vector of module IDs to be displayed.
38 UInt_t fPosition; // Position of top corner ITS module in vector fIDs.
32e219c2 39
d810d0de 40 AliEveITSModuleStepper(const AliEveITSModuleStepper&); // Not implemented
41 AliEveITSModuleStepper& operator=(const AliEveITSModuleStepper&); // Not implemented
82b3616d 42
43protected:
698e2c9b 44 AliEveITSDigitsInfo *fDigitsInfo; // Source of data and geometry.
45 AliEveDigitScaleInfo *fScaleInfo; // Parameters for digit-scaling.
46 Int_t fSubDet; // Sub-det, 0~SPD, 1~SDD, 2~SSD.
03dfc4a7 47
698e2c9b 48 TEveGridStepper *fStepper; // Module placement.
49 TGLAxis *fAxis; // Axis of color scale.
50 TGLText *fText; // GL text-output object.
51 Float_t fTextSize; // Overlay text size.
52 Float_t fPagerGap; //
53 Bool_t fRnrFrame; //
d7e36bcf 54
32e219c2 55 // module configuration
698e2c9b 56 Float_t fExpandCell; //
57 Color_t fModuleFrameCol; //
82b3616d 58
32e219c2 59 // palette configuratiom
698e2c9b 60 Float_t fPaletteOffset; //
61 Float_t fPaletteLength; //
64c42545 62
51346b82 63 // symbol configuration
698e2c9b 64 Int_t fWActive; //
65 Float_t fWWidth; //
66 Float_t fWHeight; //
67 Float_t fWOff; // Offset relative to widget size.
68 Color_t fWCol; //
69 Int_t fWActiveCol; //
70 Color_t fFontCol; //
32e219c2 71
72 // wrappers
73 Float_t TextLength(const char* txt);
74 void RenderString(TString tex ,Int_t id = -1);
75 void RenderFrame(Float_t dx, Float_t dy, Int_t id);
76 void RenderSymbol(Float_t dx, Float_t dy, Int_t id);
77 void RenderPalette(Float_t dx, Float_t x, Float_t y);
78 void RenderMenu();
79 void RenderCellIDs();
80
81 // module ID navigation
84aff7a4 82 Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
83 void AddToList(Int_t modID) { fIDs.push_back(modID);}
84 void ResetList() { fIDs.clear();}
32e219c2 85 void SetFirst(Int_t first);
82b3616d 86
87public:
d810d0de 88 AliEveITSModuleStepper(AliEveITSDigitsInfo* di);
89 virtual ~AliEveITSModuleStepper();
82b3616d 90
32e219c2 91 // external functions
92 void DisplayDet(Int_t det, Int_t layer = -1);
93 void DisplayTheta(Float_t min, Float_t max);
94
95 // overlay functions
96 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
97 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
98 Event_t* event);
99 virtual void MouseLeave();
100 virtual void Render(TGLRnrCtx& rnrCtx);
101
102 // stepper
84aff7a4 103 TEveGridStepper* GetStepper() { return fStepper; }
104 void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
32e219c2 105
106 Int_t GetCurrentPage();
107 Int_t GetPages();
108 void Start();
109 void Next();
110 void Previous();
111 void End();
112 void Apply();
113 void Capacity();
114
32e219c2 115 // getters/setters
84aff7a4 116 Color_t GetWColor() { return fWCol; }
117 void SetWColor(Color_t c) { fWCol = c; }
118 TGLText* GetFont() { return fText; }
119 void SetGLText(TGLText* t) { fText = t; }
09edeb17 120
698e2c9b 121 ClassDef(AliEveITSModuleStepper, 0); // Display scaled ITS modules in a paged layout, also providing GL-overaly control GUI.
d7e36bcf 122};
82b3616d 123
82b3616d 124#endif