CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWEveView.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWEveView
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Alja Mrak-Tadel
10 // Created: Thu Mar 16 14:11:32 CET 2010
11 //
12 
13 
14 #ifndef Fireworks_Core_FWEveView_h
15 #define Fireworks_Core_FWEveView_h
16 
17 // user include files
24 
25 // forward declarations
26 class TGLViewer;
27 class TGLOrthoCamera;
28 class TGLPerspectiveCamera;
29 class TGLCameraGuide;
30 class TGLAnnotation;
31 class TEveViewer;
32 class TEveElementList;
33 class TEveScene;
34 class TEveWindowSlot;
35 class TEveCaloViz;
36 
37 class FWEventAnnotation;
38 class CmsAnnotation;
40 class FWColorManager;
41 class FWViewContext;
42 class ViewerParameterGUI;
43 class FWViewEnergyScale;
44 class ScaleAnnotation;
46 
47 namespace fireworks
48 {
49  class Context;
50 }
51 
52 class FWEveView : public FWViewBase
53 {
54 public:
55  FWEveView(TEveWindowSlot*, FWViewType::EType, unsigned int version = 7);
56  virtual ~FWEveView();
57 
58  virtual void setFrom(const FWConfiguration&);
59  virtual void setBackgroundColor(Color_t);
60  virtual void eventEnd();
61  virtual void eventBegin();
62 
63  virtual void setContext(const fireworks::Context& x);
64  const fireworks::Context& context() { return *m_context; }
65 
66  // ---------- const member functions ---------------------
67 
68  virtual void addTo(FWConfiguration&) const;
70  virtual void saveImageTo(const std::string& iName) const;
71  virtual void populateController(ViewerParameterGUI&) const;
72 
73  TGLViewer* viewerGL() const;
74  TEveViewer* viewer() { return m_viewer; }
75  TEveScene* eventScene() { return m_eventScene;}
76  TEveScene* geoScene() { return m_geoScene; }
77 
78  TEveElement* ownedProducts() { return m_ownedProducts; }
80 
81  // ---------- static member functions --------------------
82  virtual void useGlobalEnergyScaleChanged();
83  virtual bool isEnergyScaleGlobal() const;
84  virtual void setupEnergyScale();
85  virtual void voteCaloMaxVal();
86 
87  virtual bool requestGLHandlerPick() const { return 0;}
88 
89 protected:
90  virtual void resetCamera();
91  virtual void pointLineScalesChanged();
92  virtual void cameraGuideChanged();
93 
94  // scales
95  virtual TEveCaloViz* getEveCalo() const { return 0; }
96 
97  // config
98  void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
99  void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
100  void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
101  void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
102 
103 protected:
105 
106 private:
107  FWEveView(const FWEveView&); // stop default
108  const FWEveView& operator=(const FWEveView&); // stop default
109 
110 
111  // ---------- member data --------------------------------
112 
113  TEveViewer* m_viewer;
114  TEveScene* m_eventScene;
115  TEveElement* m_ownedProducts;
116  TEveScene* m_geoScene;
117 
121  TGLCameraGuide* m_cameraGuide;
122 
123 
124 
125 
126 private:
127  // style parameters
128 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0)
130 #endif
133 
140 
143 
144  boost::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
145  std::auto_ptr<FWViewContext> m_viewContext;
146  std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;
147 
149 };
150 
151 
152 #endif
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:409
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:87
TEveScene * eventScene()
Definition: FWEveView.h:75
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:118
const FWEveView & operator=(const FWEveView &)
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:95
virtual ~FWEveView()
Definition: FWEveView.cc:180
virtual void useGlobalEnergyScaleChanged()
Definition: FWEveView.cc:282
std::auto_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:145
TEveViewer * m_viewer
Definition: FWEveView.h:113
virtual void populateController(ViewerParameterGUI &) const
Definition: FWEveView.cc:547
virtual void pointLineScalesChanged()
Definition: FWEveView.cc:220
virtual void setFrom(const FWConfiguration &)
Definition: FWEveView.cc:355
TEveScene * m_geoScene
Definition: FWEveView.h:116
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:148
virtual void setupEnergyScale()
Definition: FWEveView.cc:298
FWDoubleParameter m_pointSize
Definition: FWEveView.h:135
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWEveView.cc:192
TGLViewer * viewerGL() const
Definition: FWEveView.cc:197
const fireworks::Context * m_context
Definition: FWEveView.h:104
TEveElement * m_ownedProducts
Definition: FWEveView.h:115
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:136
virtual void eventEnd()
Definition: FWEveView.cc:246
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:141
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:142
virtual void cameraGuideChanged()
Definition: FWEveView.cc:233
virtual void voteCaloMaxVal()
Definition: FWEveView.cc:290
virtual void saveImageTo(const std::string &iName) const
Definition: FWEveView.cc:203
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:120
virtual void resetCamera()
Definition: FWEveView.cc:259
TEveViewer * viewer()
Definition: FWEveView.h:74
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:132
virtual void eventBegin()
Definition: FWEveView.cc:241
std::auto_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:146
const fireworks::Context & context()
Definition: FWEveView.h:64
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:134
FWDoubleParameter m_imageScale
Definition: FWEveView.h:129
void setFromPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
Definition: FWEveView.cc:494
FWViewContext * viewContext()
Definition: FWEveView.h:79
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:253
TEveScene * geoScene()
Definition: FWEveView.h:76
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:79
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:138
TEveScene * m_eventScene
Definition: FWEveView.h:114
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:131
TEveElement * ownedProducts()
Definition: FWEveView.h:78
boost::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:144
Definition: DDAxes.h:10
virtual bool isEnergyScaleGlobal() const
Definition: FWEveView.cc:276
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:137
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:139
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:429
virtual void addTo(FWConfiguration &) const
Definition: FWEveView.cc:337
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:121
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:266
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:119
void addToPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
Definition: FWEveView.cc:465