]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/TPCSector2DGL.h
Added interface to load-time threshold/(auto)pedestal settings.
[u/mrichter/AliRoot.git] / EVE / Alieve / TPCSector2DGL.h
1 // $Header$
2
3 #ifndef ALIEVE_TPCSector2DGL_H
4 #define ALIEVE_TPCSector2DGL_H
5
6 #include <TGLObject.h>
7
8 #include <Alieve/TPCSector2D.h>
9 #include <Alieve/TPCSectorData.h>
10
11 class TGLViewer;
12 class TGLScene;
13
14 namespace Alieve {
15
16 class TPCSector2DGL : public TGLObject
17 {
18   TPCSector2DGL(const TPCSector2DGL&);            // Not implemented
19   TPCSector2DGL& operator=(const TPCSector2DGL&); // Not implemented
20
21 protected:
22   virtual void DirectDraw(const TGLDrawFlags & flags) const;
23
24   void LoadPadrow(TPCSectorData::RowIterator& iter, Int_t row, Int_t off) const;
25   void CreateTexture() const;
26
27   void DisplayTexture(const TPCSectorData::SegmentInfo& seg,
28                       Int_t startCol, Int_t startRow) const;
29   void DisplayQuads(const TPCSectorData::SegmentInfo& seg,
30                     Int_t startCol, Int_t startRow) const;
31   void DisplayNamedQuads(const TPCSectorData::SegmentInfo& seg,
32                          Int_t startCol, Int_t startRow) const;
33   void DisplayFrame() const;
34
35   UChar_t* GetRowCol(Int_t row, Int_t col) const;
36
37   TPCSector2D*                 fSector;
38   mutable TPCSectorData*       fSectorData;
39
40   mutable UChar_t*             fImage;
41   mutable UInt_t               fTexture;
42   mutable UInt_t               fRTS;
43  
44 public:
45   TPCSector2DGL();
46   virtual ~TPCSector2DGL();
47
48   virtual Bool_t SetModel(TObject* obj); 
49   virtual void   SetBBox();
50   virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
51
52   virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
53
54   static void TraceStepsUp  (const TPCSectorData::SegmentInfo& s);
55   static void TraceStepsDown(const TPCSectorData::SegmentInfo& s);
56
57   static const Int_t fgkTextureWidth;
58   static const Int_t fgkTextureHeight;
59   static const Int_t fgkTextureByteSize;
60
61 }; // endclass TPCSector2D_GL_Rnr
62   
63
64 inline UChar_t* TPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
65 {
66   return fImage + 4*(row*fgkTextureWidth + col);
67 }
68
69
70 }
71
72 #endif