Logo ROOT   6.08/07
Reference Guide
TEveCalo2DGL.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveCalo2DGL
13 #define ROOT_TEveCalo2DGL
14 
15 #include "TGLObject.h"
16 #include "TEveCaloData.h"
17 #include "TEveCalo.h"
18 
19 class TGLViewer;
20 class TGLScene;
21 
22 class TEveCalo2D;
23 class TEveProjection;
24 
25 class TEveCalo2DGL : public TGLObject
26 {
27 private:
28  TEveCalo2DGL(const TEveCalo2DGL&); // Not implemented
29  TEveCalo2DGL& operator=(const TEveCalo2DGL&); // Not implemented
30 
31 protected:
32  TEveCalo2D *fM; // Model object.
33 
34  void MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t& offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH) const;
35 
36  void MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset) const;
37 
38  void DrawRPhi(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
39  void DrawRPhiHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
40  void DrawRhoZ(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
41  void DrawRhoZHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
42 
43  Bool_t IsRPhi() const;
44 
45 public:
46  TEveCalo2DGL();
47  virtual ~TEveCalo2DGL() {}
48 
49  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
50  virtual void SetBBox();
51 
52  virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
53  virtual void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const;
54 
55  // To support two-level selection
56  virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
57  virtual Bool_t AlwaysSecondarySelect() const { return kTRUE; }
58  virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
59 
60  ClassDef(TEveCalo2DGL, 0); // GL renderer class for TEveCalo2D.
61 };
62 
63 #endif
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
void DrawRhoZHighlighted(std::vector< TEveCaloData::vCellId_t *> &cellLists) const
Draw selected calorimeter cells in RhoZ projection.
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const
Draw towers in highlight mode.
TEveCalo2DGL & operator=(const TEveCalo2DGL &)
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Concrete physical shape - a GL drawable.
#define ClassDef(name, id)
Definition: Rtypes.h:254
Visualization of a calorimeter event data in 2D.
Definition: TEveCalo.h:199
void DrawRhoZ(TGLRnrCtx &rnrCtx, TEveCalo2D::vBinCells_t &) const
Draw calorimeter in RhoZ projection.
void MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset) const
Calculate vertices for the calorimeter cell in RPhi projection.
Base-class for direct OpenGL renderers.
Definition: TGLObject.h:21
void MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t &offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH) const
Draw cell in RhoZ projection.
Base-class for non-linear projections.
virtual ~TEveCalo2DGL()
Definition: TEveCalo2DGL.h:47
OpenGL renderer class for TEveCalo2D.
Definition: TEveCalo2DGL.h:25
TEveCalo2D * fM
Definition: TEveCalo2DGL.h:32
void DrawRPhi(TGLRnrCtx &rnrCtx, TEveCalo2D::vBinCells_t &) const
Draw calorimeter cells in RPhi projection.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
Standard selection record including information about containing scene and details ob out selected ob...
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
virtual Bool_t AlwaysSecondarySelect() const
Definition: TEveCalo2DGL.h:57
std::vector< TEveCaloData::vCellId_t * > vBinCells_t
Definition: TEveCalo.h:205
Bool_t IsRPhi() const
Is current projection type RPhi.
Mother of all ROOT objects.
Definition: TObject.h:37
TEveCalo2DGL()
Constructor.
TGLScene provides management and rendering of ROOT&#39;s default 3D /object representation as logical and...
Definition: TGLScene.h:30
virtual void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec)
Processes tower selection in eta bin or phi bin.
virtual void SetBBox()
Set bounding box.
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
virtual Bool_t SupportsSecondarySelect() const
Definition: TEveCalo2DGL.h:56
void DrawRPhiHighlighted(std::vector< TEveCaloData::vCellId_t *> &cellLists) const
Draw selected calorimeter cells in RPhi projection.