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 // $Id: FWEveView.h,v 1.31 2013/04/24 04:08:45 amraktad Exp $
12 //
13 
14 
15 #ifndef Fireworks_Core_FWEveView_h
16 #define Fireworks_Core_FWEveView_h
17 
18 // user include files
25 
26 // forward declarations
27 class TGLViewer;
28 class TGLOrthoCamera;
29 class TGLPerspectiveCamera;
30 class TGLCameraGuide;
31 class TGLAnnotation;
32 class TEveViewer;
33 class TEveElementList;
34 class TEveScene;
35 class TEveWindowSlot;
36 class TEveCaloViz;
37 
38 class FWEventAnnotation;
39 class CmsAnnotation;
41 class FWColorManager;
42 class FWViewContext;
43 class ViewerParameterGUI;
44 class FWViewEnergyScale;
45 class ScaleAnnotation;
47 
48 namespace fireworks
49 {
50  class Context;
51 }
52 
53 class FWEveView : public FWViewBase
54 {
55 public:
56  FWEveView(TEveWindowSlot*, FWViewType::EType, unsigned int version = 7);
57  virtual ~FWEveView();
58 
59  virtual void setFrom(const FWConfiguration&);
60  virtual void setBackgroundColor(Color_t);
61  virtual void eventEnd();
62  virtual void eventBegin();
63 
64  virtual void setContext(const fireworks::Context& x);
65  const fireworks::Context& context() { return *m_context; }
66 
67  // ---------- const member functions ---------------------
68 
69  virtual void addTo(FWConfiguration&) const;
71  virtual void saveImageTo(const std::string& iName) const;
72  virtual void populateController(ViewerParameterGUI&) const;
73 
74  TGLViewer* viewerGL() const;
75  TEveViewer* viewer() { return m_viewer; }
76  TEveScene* eventScene() { return m_eventScene;}
77  TEveScene* geoScene() { return m_geoScene; }
78 
79  TEveElement* ownedProducts() { return m_ownedProducts; }
81 
82  // ---------- static member functions --------------------
83  virtual void useGlobalEnergyScaleChanged();
84  virtual bool isEnergyScaleGlobal() const;
85  virtual void setupEnergyScale();
86  virtual void voteCaloMaxVal();
87 
88  virtual bool requestGLHandlerPick() const { return 0;}
89 
90 protected:
91  virtual void resetCamera();
92  virtual void pointLineScalesChanged();
93  virtual void cameraGuideChanged();
94 
95  // scales
96  virtual TEveCaloViz* getEveCalo() const { return 0; }
97 
98  // config
99  void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
100  void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
101  void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
102  void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
103 
104 private:
105  FWEveView(const FWEveView&); // stop default
106  const FWEveView& operator=(const FWEveView&); // stop default
107 
108 
109  // ---------- member data --------------------------------
110 
111  TEveViewer* m_viewer;
112  TEveScene* m_eventScene;
113  TEveElement* m_ownedProducts;
114  TEveScene* m_geoScene;
115 
119  TGLCameraGuide* m_cameraGuide;
120 
122 
123 
124 
125 private:
126  // style parameters
127 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0)
129 #endif
132 
139 
142 
143  boost::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
144  std::auto_ptr<FWViewContext> m_viewContext;
145  std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;
146 
148 };
149 
150 
151 #endif
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:405
virtual bool requestGLHandlerPick() const
Definition: FWEveView.h:88
TEveScene * eventScene()
Definition: FWEveView.h:76
FWEventAnnotation * m_overlayEventInfo
Definition: FWEveView.h:116
const FWEveView & operator=(const FWEveView &)
virtual TEveCaloViz * getEveCalo() const
Definition: FWEveView.h:96
virtual ~FWEveView()
Definition: FWEveView.cc:181
virtual void useGlobalEnergyScaleChanged()
Definition: FWEveView.cc:283
std::auto_ptr< FWViewContext > m_viewContext
Definition: FWEveView.h:144
TEveViewer * m_viewer
Definition: FWEveView.h:111
virtual void populateController(ViewerParameterGUI &) const
Definition: FWEveView.cc:543
virtual void pointLineScalesChanged()
Definition: FWEveView.cc:221
virtual void setFrom(const FWConfiguration &)
Definition: FWEveView.cc:356
TEveScene * m_geoScene
Definition: FWEveView.h:114
FWViewEnergyScaleEditor * m_viewEnergyScaleEditor
Definition: FWEveView.h:147
virtual void setupEnergyScale()
Definition: FWEveView.cc:299
FWDoubleParameter m_pointSize
Definition: FWEveView.h:134
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWEveView.cc:193
TGLViewer * viewerGL() const
Definition: FWEveView.cc:198
const fireworks::Context * m_context
Definition: FWEveView.h:121
TEveElement * m_ownedProducts
Definition: FWEveView.h:113
FWBoolParameter m_lineSmooth
Definition: FWEveView.h:135
virtual void eventEnd()
Definition: FWEveView.cc:247
FWBoolParameter m_showCameraGuide
Definition: FWEveView.h:140
FWBoolParameter m_useGlobalEnergyScale
Definition: FWEveView.h:141
virtual void cameraGuideChanged()
Definition: FWEveView.cc:234
virtual void voteCaloMaxVal()
Definition: FWEveView.cc:291
virtual void saveImageTo(const std::string &iName) const
Definition: FWEveView.cc:204
ScaleAnnotation * m_energyMaxValAnnotation
Definition: FWEveView.h:118
virtual void resetCamera()
Definition: FWEveView.cc:260
TEveViewer * viewer()
Definition: FWEveView.h:75
FWBoolParameter m_drawCMSLogo
Definition: FWEveView.h:131
virtual void eventBegin()
Definition: FWEveView.cc:242
std::auto_ptr< FWViewEnergyScale > m_localEnergyScale
Definition: FWEveView.h:145
const fireworks::Context & context()
Definition: FWEveView.h:65
FWBoolParameter m_pointSmooth
Definition: FWEveView.h:133
FWDoubleParameter m_imageScale
Definition: FWEveView.h:128
void setFromPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
Definition: FWEveView.cc:490
FWViewContext * viewContext()
Definition: FWEveView.h:80
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:254
TEveScene * geoScene()
Definition: FWEveView.h:77
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:80
FWDoubleParameter m_lineOutlineScale
Definition: FWEveView.h:137
TEveScene * m_eventScene
Definition: FWEveView.h:112
FWEnumParameter m_eventInfoLevel
Definition: FWEveView.h:130
TEveElement * ownedProducts()
Definition: FWEveView.h:79
boost::shared_ptr< FWViewContextMenuHandlerGL > m_viewContextMenu
Definition: FWEveView.h:143
Definition: DDAxes.h:10
virtual bool isEnergyScaleGlobal() const
Definition: FWEveView.cc:277
FWDoubleParameter m_lineWidth
Definition: FWEveView.h:136
FWDoubleParameter m_lineWireframeScale
Definition: FWEveView.h:138
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:425
virtual void addTo(FWConfiguration &) const
Definition: FWEveView.cc:338
TGLCameraGuide * m_cameraGuide
Definition: FWEveView.h:119
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:267
CmsAnnotation * m_overlayLogo
Definition: FWEveView.h:117
void addToPerspectiveCamera(TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
Definition: FWEveView.cc:461