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 private:
112  FWEveView(const FWEveView&) = delete; // stop default
113  const FWEveView& operator=(const FWEveView&) = delete; // stop default
114 
115  // ---------- member data --------------------------------
116 
118  TEveScene* m_eventScene;
119  TEveElement* m_ownedProducts;
120  TEveScene* m_geoScene;
121 
125  TGLCameraGuide* m_cameraGuide;
126 
127 private:
128  // style parameters
129 #if ROOT_VERSION_CODE >= ROOT_VERSION(5, 26, 0)
131 #endif
134 
141 
144 
145  std::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
146  std::unique_ptr<FWViewContext> m_viewContext;
147  std::unique_ptr<FWViewEnergyScale> m_localEnergyScale;
148 
150 };
151 
152 #endif
FWEveView::setupEnergyScale
virtual void setupEnergyScale()
Definition: FWEveView.cc:251
FWEnumParameter
Definition: FWEnumParameter.h:30
FWEveView::contextMenuHandler
FWViewContextMenuHandlerBase * contextMenuHandler() const override
Definition: FWEveView.cc:173
fireworks::Context
Definition: Context.h:41
FWEveView::m_lineWireframeScale
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:140
FWEveView::m_useGlobalEnergyScale
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:143
FWGenericParameterWithRange
Definition: FWGenericParameterWithRange.h:27
FWViewType::EType
EType
Definition: FWViewType.h:31
FWEveView::m_drawCMSLogo
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:133
FWBoolParameter.h
FWEveView::m_localEnergyScale
std::unique_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:147
FWEveView::getEveCalo
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:100
FWEveView::fwViewer
FWTEveViewer * fwViewer()
Definition: FWEveView.h:77
ViewerParameterGUI
Definition: CmsShowViewPopup.h:49
FWEveView::eventBegin
virtual void eventBegin()
Definition: FWEveView.cc:215
FWEveView::m_viewEnergyScaleEditor
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:149
FWViewContextMenuHandlerBase
Definition: FWViewContextMenuHandlerBase.h:29
FWViewContextMenuHandlerGL
Definition: FWViewContextMenuHandlerGL.h:9
FWEveView::populateController
void populateController(ViewerParameterGUI &) const override
Definition: FWEveView.cc:466
FWEveView::setFrom
void setFrom(const FWConfiguration &) override
Definition: FWEveView.cc:307
FWEveView::viewContext
FWViewContext * viewContext()
Definition: FWEveView.h:83
Context
FWTEveViewer
Definition: FWTEveViewer.h:36
DDAxes::x
FWEveView::m_lineSmooth
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:137
FWGenericParameter
Definition: FWGenericParameter.h:31
FWEveView::useGlobalEnergyScaleChanged
virtual void useGlobalEnergyScaleChanged()
Definition: FWEveView.cc:237
FWEveView::requestGLHandlerPick
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:92
FWEveView::m_cameraGuide
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:125
FWViewEnergyScaleEditor
Definition: FWViewEnergyScaleEditor.h:37
FWEveView::setupEventCenter
virtual void setupEventCenter()
Definition: FWEveView.cc:283
FWEveView::saveImageTo
void saveImageTo(const std::string &iName) const override
Definition: FWEveView.cc:183
FWEveView::eventScene
TEveScene * eventScene()
Definition: FWEveView.h:79
FWEveView::m_viewer
FWTEveViewer * m_viewer
Definition: FWEveView.h:117
FWEveView
Definition: FWEveView.h:53
FWEveView::context
const fireworks::Context & context()
Definition: FWEveView.h:64
FWEveView::~FWEveView
~FWEveView() override
Definition: FWEveView.cc:164
FWEveView::setFromPerspectiveCamera
void setFromPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
Definition: FWEveView.cc:420
FWEveView::m_viewContextMenu
std::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:145
FWEveView::viewer
TEveViewer * viewer()
Definition: FWEveView.cc:179
FWEveView::pointLineScalesChanged
virtual void pointLineScalesChanged()
Definition: FWEveView.cc:198
FWLongParameter.h
FWEveView::cameraGuideChanged
virtual void cameraGuideChanged()
Definition: FWEveView.cc:209
FWEveView::ownedProducts
TEveElement * ownedProducts()
Definition: FWEveView.h:82
FWEveView::m_pointSmooth
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:135
ScaleAnnotation
Definition: FWEveView.cc:57
FWEveView::m_overlayLogo
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:123
FWEveView::isEnergyScaleGlobal
virtual bool isEnergyScaleGlobal() const
Definition: FWEveView.cc:235
FWEveView::operator=
const FWEveView & operator=(const FWEveView &)=delete
FWEveView::addToOrthoCamera
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:352
FWEventAnnotation
Definition: FWEventAnnotation.h:11
FWEveView::m_geoScene
TEveScene * m_geoScene
Definition: FWEveView.h:120
FWEveView::m_showCameraGuide
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:142
FWEveView::m_pointSize
FWDoubleParameter m_pointSize
Definition: FWEveView.h:136
FWEveView::setBackgroundColor
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:222
FWEveView::m_context
const fireworks::Context * m_context
Definition: FWEveView.h:109
FWEveView::m_overlayEventInfo
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:122
FWEveView::m_ownedProducts
TEveElement * m_ownedProducts
Definition: FWEveView.h:119
FWEnumParameter.h
FWEveView::m_viewContext
std::unique_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:146
FWEveView::FWEveView
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:70
FWDoubleParameter.h
FWColorManager
Definition: FWColorManager.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWViewContext
Definition: FWViewContext.h:32
FWEveView::m_eventInfoLevel
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:132
FWViewBase.h
FWEveView::addToPerspectiveCamera
void addToPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
Definition: FWEveView.cc:397
FWEveView::setFromOrthoCamera
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:368
FWEveView::addTo
void addTo(FWConfiguration &) const override
Definition: FWEveView.cc:291
FWConfigurableParameterizable::version
unsigned int version() const
Definition: FWConfigurableParameterizable.h:37
CmsAnnotation
Definition: CmsAnnotation.h:10
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
FWEveView::m_energyMaxValAnnotation
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:124
FWEveView::resetCamera
virtual void resetCamera()
Definition: FWEveView.cc:224
FWEveView::m_imageScale
FWDoubleParameter m_imageScale
Definition: FWEveView.h:130
FWEveView::eventEnd
virtual void eventEnd()
Definition: FWEveView.cc:217
FWEveView::m_eventScene
TEveScene * m_eventScene
Definition: FWEveView.h:118
FWEveView::viewerGL
TGLViewer * viewerGL() const
Definition: FWEveView.cc:177
FWEvePtr.h
FWConfiguration
Definition: FWConfiguration.h:31
FWEveView::setContext
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:227
FWEveView::voteCaloMaxVal
virtual void voteCaloMaxVal()
Definition: FWEveView.cc:245
fireworks
Definition: FWTauProxyBuilderBase.h:35
FWEveView::geoScene
TEveScene * geoScene()
Definition: FWEveView.h:80
FWEveView::m_lineOutlineScale
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:139
FWViewBase
Definition: FWViewBase.h:36
FWTGLViewer
Definition: FWTGLViewer.h:32
FWEveView::fwViewerGL
FWTGLViewer * fwViewerGL() const
Definition: FWEveView.cc:181
FWEveView::m_lineWidth
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:138