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;
69  FWViewContextMenuHandlerBase* contextMenuHandler() 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;
77  FWTEveViewer* fwViewer() { return m_viewer; }
78 
79  TEveScene* eventScene() { return m_eventScene; }
80  TEveScene* geoScene() { return m_geoScene; }
81 
82  TEveElement* ownedProducts() { return m_ownedProducts; }
83  FWViewContext* viewContext() { return m_viewContext.get(); }
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
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:92
TEveScene * eventScene()
Definition: FWEveView.h:79
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:122
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:100
std::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:145
TEveScene * m_geoScene
Definition: FWEveView.h:120
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:149
FWDoubleParameter m_pointSize
Definition: FWEveView.h:136
FWTEveViewer * fwViewer()
Definition: FWEveView.h:77
const fireworks::Context * m_context
Definition: FWEveView.h:109
TEveElement * m_ownedProducts
Definition: FWEveView.h:119
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:137
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:142
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:143
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:124
FWTEveViewer * m_viewer
Definition: FWEveView.h:117
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:133
std::unique_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:147
const fireworks::Context & context()
Definition: FWEveView.h:64
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:135
FWDoubleParameter m_imageScale
Definition: FWEveView.h:130
FWViewContext * viewContext()
Definition: FWEveView.h:83
TEveScene * geoScene()
Definition: FWEveView.h:80
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:139
TEveScene * m_eventScene
Definition: FWEveView.h:118
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:132
std::unique_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:146
TEveElement * ownedProducts()
Definition: FWEveView.h:82
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:138
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:140
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:125
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:123