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 
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 FWTGLViewer;
38 class FWTEveViewer;
39 
40 class FWEventAnnotation;
41 class CmsAnnotation;
43 class FWColorManager;
44 class FWViewContext;
45 class ViewerParameterGUI;
46 class FWViewEnergyScale;
47 class ScaleAnnotation;
49 
50 namespace fireworks
51 {
52  class Context;
53 }
54 
55 class FWEveView : public FWViewBase
56 {
57 public:
58  FWEveView(TEveWindowSlot*, FWViewType::EType, unsigned int version = 7);
59  ~FWEveView() override;
60 
61  void setFrom(const FWConfiguration&) override;
62  virtual void setBackgroundColor(Color_t);
63  virtual void eventEnd();
64  virtual void eventBegin();
65 
66  virtual void setContext(const fireworks::Context& x);
67  const fireworks::Context& context() { return *m_context; }
68 
69  // ---------- const member functions ---------------------
70 
71  void addTo(FWConfiguration&) const override;
72  FWViewContextMenuHandlerBase* contextMenuHandler() const override;
73  void saveImageTo(const std::string& iName) const override;
74  void populateController(ViewerParameterGUI&) const override;
75 
76  TGLViewer* viewerGL() const;
77  TEveViewer* viewer();
78 
79  FWTGLViewer* fwViewerGL() const;
80  FWTEveViewer* fwViewer() { return m_viewer; }
81 
82  TEveScene* eventScene() { return m_eventScene;}
83  TEveScene* geoScene() { return m_geoScene; }
84 
85  TEveElement* ownedProducts() { return m_ownedProducts; }
86  FWViewContext* viewContext() { return m_viewContext.get(); }
87 
88  // ---------- static member functions --------------------
89  virtual void useGlobalEnergyScaleChanged();
90  virtual bool isEnergyScaleGlobal() const;
91  virtual void setupEnergyScale();
92  virtual void setupEventCenter();
93  virtual void voteCaloMaxVal();
94 
95  virtual bool requestGLHandlerPick() const { return false;}
96 
97 protected:
98  virtual void resetCamera();
99  virtual void pointLineScalesChanged();
100  virtual void cameraGuideChanged();
101 
102  // scales
103  virtual TEveCaloViz* getEveCalo() const { return nullptr; }
104 
105  // config
106  void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
107  void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
108  void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
109  void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
110 
111 protected:
113 
114 private:
115  FWEveView(const FWEveView&) = delete; // stop default
116  const FWEveView& operator=(const FWEveView&) = delete; // stop default
117 
118 
119  // ---------- member data --------------------------------
120 
122  TEveScene* m_eventScene;
123  TEveElement* m_ownedProducts;
124  TEveScene* m_geoScene;
125 
129  TGLCameraGuide* m_cameraGuide;
130 
131 private:
132  // style parameters
133 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0)
135 #endif
138 
145 
148 
149  std::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
150  std::auto_ptr<FWViewContext> m_viewContext;
151  std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;
152 
154 };
155 
156 
157 #endif
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:95
TEveScene * eventScene()
Definition: FWEveView.h:82
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:126
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:103
std::auto_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:150
std::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:149
TEveScene * m_geoScene
Definition: FWEveView.h:124
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:153
FWDoubleParameter m_pointSize
Definition: FWEveView.h:140
FWTEveViewer * fwViewer()
Definition: FWEveView.h:80
const fireworks::Context * m_context
Definition: FWEveView.h:112
TEveElement * m_ownedProducts
Definition: FWEveView.h:123
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:141
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:146
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:147
T x() const
Cartesian x coordinate.
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:128
FWTEveViewer * m_viewer
Definition: FWEveView.h:121
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:137
std::auto_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:151
const fireworks::Context & context()
Definition: FWEveView.h:67
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:139
FWDoubleParameter m_imageScale
Definition: FWEveView.h:134
FWViewContext * viewContext()
Definition: FWEveView.h:86
TEveScene * geoScene()
Definition: FWEveView.h:83
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:143
TEveScene * m_eventScene
Definition: FWEveView.h:122
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:136
TEveElement * ownedProducts()
Definition: FWEveView.h:85
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:142
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:144
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:129
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:127