CMS 3D CMS Logo

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 #ifndef Fireworks_Core_FWEveView_h
14 #define Fireworks_Core_FWEveView_h
15 
16 // user include files
23 
24 // forward declarations
25 class TGLViewer;
26 class TGLOrthoCamera;
27 class TGLPerspectiveCamera;
28 class TGLCameraGuide;
29 class TGLAnnotation;
30 class TEveViewer;
31 class TEveElementList;
32 class TEveScene;
33 class TEveWindowSlot;
34 class TEveCaloViz;
35 
36 class FWTGLViewer;
37 class FWTEveViewer;
38 
39 class FWEventAnnotation;
40 class CmsAnnotation;
42 class FWColorManager;
43 class FWViewContext;
44 class ViewerParameterGUI;
45 class FWViewEnergyScale;
46 class ScaleAnnotation;
48 
49 namespace fireworks {
50  class Context;
51 }
52 
53 class FWEveView : public FWViewBase {
54 public:
55  FWEveView(TEveWindowSlot*, FWViewType::EType, unsigned int version = 7);
56  ~FWEveView() override;
57 
58  void setFrom(const FWConfiguration&) override;
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  void addTo(FWConfiguration&) const override;
70  void saveImageTo(const std::string& iName) const override;
71  void populateController(ViewerParameterGUI&) const override;
72 
73  TGLViewer* viewerGL() const;
74  TEveViewer* viewer();
75 
76  FWTGLViewer* fwViewerGL() const;
78 
79  TEveScene* eventScene() { return m_eventScene; }
80  TEveScene* geoScene() { return m_geoScene; }
81 
82  TEveElement* ownedProducts() { return m_ownedProducts; }
84 
85  // ---------- static member functions --------------------
86  virtual void useGlobalEnergyScaleChanged();
87  virtual bool isEnergyScaleGlobal() const;
88  virtual void setupEnergyScale();
89  virtual void setupEventCenter();
90  virtual void voteCaloMaxVal();
91 
92  virtual bool requestGLHandlerPick() const { return false; }
93 
94 protected:
95  virtual void resetCamera();
96  virtual void pointLineScalesChanged();
97  virtual void cameraGuideChanged();
98 
99  // scales
100  virtual TEveCaloViz* getEveCalo() const { return nullptr; }
101 
102  // config
103  void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
104  void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
105  void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
106  void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
107 
108 protected:
110 
111 public:
112  FWEveView(const FWEveView&) = delete; // stop default
113  const FWEveView& operator=(const FWEveView&) = delete; // stop default
114 
115 private:
116  // ---------- member data --------------------------------
117 
119  TEveScene* m_eventScene;
120  TEveElement* m_ownedProducts;
121  TEveScene* m_geoScene;
122 
126  TGLCameraGuide* m_cameraGuide;
127 
128 private:
129  // style parameters
130 #if ROOT_VERSION_CODE >= ROOT_VERSION(5, 26, 0)
132 #endif
135 
142 
145 
146  std::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
147  std::unique_ptr<FWViewContext> m_viewContext;
148  std::unique_ptr<FWViewEnergyScale> m_localEnergyScale;
149 
151 };
152 
153 #endif
TEveScene * eventScene()
Definition: FWEveView.h:79
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:123
virtual void useGlobalEnergyScaleChanged()
Definition: FWEveView.cc:237
const FWEveView & operator=(const FWEveView &)=delete
std::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:146
virtual void pointLineScalesChanged()
Definition: FWEveView.cc:198
FWTGLViewer * fwViewerGL() const
Definition: FWEveView.cc:181
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:92
TEveScene * m_geoScene
Definition: FWEveView.h:121
virtual void setupEventCenter()
Definition: FWEveView.cc:283
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:150
virtual void setupEnergyScale()
Definition: FWEveView.cc:251
FWDoubleParameter m_pointSize
Definition: FWEveView.h:137
FWTEveViewer * fwViewer()
Definition: FWEveView.h:77
const fireworks::Context * m_context
Definition: FWEveView.h:109
TEveElement * m_ownedProducts
Definition: FWEveView.h:120
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:138
virtual bool isEnergyScaleGlobal() const
Definition: FWEveView.cc:235
virtual void eventEnd()
Definition: FWEveView.cc:217
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:143
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:144
virtual void cameraGuideChanged()
Definition: FWEveView.cc:209
virtual void voteCaloMaxVal()
Definition: FWEveView.cc:245
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:125
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:100
void saveImageTo(const std::string &iName) const override
Definition: FWEveView.cc:183
FWTEveViewer * m_viewer
Definition: FWEveView.h:118
TEveViewer * viewer()
Definition: FWEveView.cc:179
FWViewContextMenuHandlerBase * contextMenuHandler() const override
Definition: FWEveView.cc:173
virtual void resetCamera()
Definition: FWEveView.cc:224
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:352
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:134
std::unique_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:148
virtual void eventBegin()
Definition: FWEveView.cc:215
const fireworks::Context & context()
Definition: FWEveView.h:64
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:136
FWDoubleParameter m_imageScale
Definition: FWEveView.h:131
void populateController(ViewerParameterGUI &) const override
Definition: FWEveView.cc:466
void setFrom(const FWConfiguration &) override
Definition: FWEveView.cc:307
void setFromPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
Definition: FWEveView.cc:420
FWViewContext * viewContext()
Definition: FWEveView.h:83
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:222
TEveScene * geoScene()
Definition: FWEveView.h:80
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:70
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:140
TEveScene * m_eventScene
Definition: FWEveView.h:119
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:133
std::unique_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:147
TEveElement * ownedProducts()
Definition: FWEveView.h:82
~FWEveView() override
Definition: FWEveView.cc:164
void addToPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
Definition: FWEveView.cc:397
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:139
void addTo(FWConfiguration &) const override
Definition: FWEveView.cc:291
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:141
TGLViewer * viewerGL() const
Definition: FWEveView.cc:177
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:368
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:126
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:227
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:124