CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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;
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;
81 
82  TEveScene* eventScene() { return m_eventScene;}
83  TEveScene* geoScene() { return m_geoScene; }
84 
85  TEveElement* ownedProducts() { return m_ownedProducts; }
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  boost::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
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:414
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:94
TEveScene * eventScene()
Definition: FWEveView.h:82
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:125
const FWEveView & operator=(const FWEveView &)
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:102
virtual ~FWEveView()
Definition: FWEveView.cc:173
virtual void useGlobalEnergyScaleChanged()
Definition: FWEveView.cc:287
std::auto_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:149
FWTGLViewer * fwViewerGL() const
Definition: FWEveView.cc:202
virtual void populateController(ViewerParameterGUI &) const
Definition: FWEveView.cc:546
virtual void pointLineScalesChanged()
Definition: FWEveView.cc:225
virtual void setFrom(const FWConfiguration &)
Definition: FWEveView.cc:360
TEveScene * m_geoScene
Definition: FWEveView.h:123
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:152
virtual void setupEnergyScale()
Definition: FWEveView.cc:303
FWDoubleParameter m_pointSize
Definition: FWEveView.h:139
FWTEveViewer * fwViewer()
Definition: FWEveView.h:80
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWEveView.cc:185
TGLViewer * viewerGL() const
Definition: FWEveView.cc:190
const fireworks::Context * m_context
Definition: FWEveView.h:111
TEveElement * m_ownedProducts
Definition: FWEveView.h:122
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:140
virtual void eventEnd()
Definition: FWEveView.cc:251
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:145
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:146
virtual void cameraGuideChanged()
Definition: FWEveView.cc:238
virtual void voteCaloMaxVal()
Definition: FWEveView.cc:295
virtual void saveImageTo(const std::string &iName) const
Definition: FWEveView.cc:208
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:127
FWTEveViewer * m_viewer
Definition: FWEveView.h:120
TEveViewer * viewer()
Definition: FWEveView.cc:196
virtual void resetCamera()
Definition: FWEveView.cc:264
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:136
virtual void eventBegin()
Definition: FWEveView.cc:246
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
void setFromPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
Definition: FWEveView.cc:494
FWViewContext * viewContext()
Definition: FWEveView.h:86
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:258
TEveScene * geoScene()
Definition: FWEveView.h:83
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:77
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
boost::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:148
virtual bool isEnergyScaleGlobal() const
Definition: FWEveView.cc:281
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:141
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:143
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:432
virtual void addTo(FWConfiguration &) const
Definition: FWEveView.cc:342
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:128
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:271
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:126
void addToPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
Definition: FWEveView.cc:467