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  virtual ~FWEveView();
60 
61  virtual void setFrom(const FWConfiguration&);
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  virtual void addTo(FWConfiguration&) const;
72  virtual FWViewContextMenuHandlerBase* contextMenuHandler() const;
73  virtual void saveImageTo(const std::string& iName) const;
74  virtual void populateController(ViewerParameterGUI&) const;
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 voteCaloMaxVal();
93 
94  virtual bool requestGLHandlerPick() const { return 0;}
95 
96 protected:
97  virtual void resetCamera();
98  virtual void pointLineScalesChanged();
99  virtual void cameraGuideChanged();
100 
101  // scales
102  virtual TEveCaloViz* getEveCalo() const { return 0; }
103 
104  // config
105  void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
106  void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
107  void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
108  void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
109 
110 protected:
112 
113 private:
114  FWEveView(const FWEveView&); // stop default
115  const FWEveView& operator=(const FWEveView&); // stop default
116 
117 
118  // ---------- member data --------------------------------
119 
121  TEveScene* m_eventScene;
122  TEveElement* m_ownedProducts;
123  TEveScene* m_geoScene;
124 
128  TGLCameraGuide* m_cameraGuide;
129 
130 private:
131  // style parameters
132 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0)
134 #endif
137 
144 
147 
148  std::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
149  std::auto_ptr<FWViewContext> m_viewContext;
150  std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;
151 
153 };
154 
155 
156 #endif
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:94
TEveScene * eventScene()
Definition: FWEveView.h:82
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:125
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:102
std::auto_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:149
std::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:148
TEveScene * m_geoScene
Definition: FWEveView.h:123
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:152
FWDoubleParameter m_pointSize
Definition: FWEveView.h:139
FWTEveViewer * fwViewer()
Definition: FWEveView.h:80
const fireworks::Context * m_context
Definition: FWEveView.h:111
TEveElement * m_ownedProducts
Definition: FWEveView.h:122
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:140
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:145
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:146
T x() const
Cartesian x coordinate.
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:127
FWTEveViewer * m_viewer
Definition: FWEveView.h:120
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:136
std::auto_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:150
const fireworks::Context & context()
Definition: FWEveView.h:67
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:138
FWDoubleParameter m_imageScale
Definition: FWEveView.h:133
FWViewContext * viewContext()
Definition: FWEveView.h:86
TEveScene * geoScene()
Definition: FWEveView.h:83
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:142
TEveScene * m_eventScene
Definition: FWEveView.h:121
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:135
TEveElement * ownedProducts()
Definition: FWEveView.h:85
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:141
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:143
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:128
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:126