Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef Fireworks_Core_FWEveView_h
00016 #define Fireworks_Core_FWEveView_h
00017
00018
00019 #include "Fireworks/Core/interface/FWViewBase.h"
00020 #include "Fireworks/Core/interface/FWDoubleParameter.h"
00021 #include "Fireworks/Core/interface/FWBoolParameter.h"
00022 #include "Fireworks/Core/interface/FWLongParameter.h"
00023 #include "Fireworks/Core/interface/FWEnumParameter.h"
00024 #include "Fireworks/Core/interface/FWEvePtr.h"
00025
00026
00027 class TGLViewer;
00028 class TGLOrthoCamera;
00029 class TGLPerspectiveCamera;
00030 class TGLCameraGuide;
00031 class TGLAnnotation;
00032 class TEveViewer;
00033 class TEveElementList;
00034 class TEveScene;
00035 class TEveWindowSlot;
00036 class TEveCaloViz;
00037
00038 class FWEventAnnotation;
00039 class CmsAnnotation;
00040 class FWViewContextMenuHandlerGL;
00041 class FWColorManager;
00042 class FWViewContext;
00043 class ViewerParameterGUI;
00044 class FWViewEnergyScale;
00045 class ScaleAnnotation;
00046 class FWViewEnergyScaleEditor;
00047
00048 namespace fireworks
00049 {
00050 class Context;
00051 }
00052
00053 class FWEveView : public FWViewBase
00054 {
00055 public:
00056 FWEveView(TEveWindowSlot*, FWViewType::EType, unsigned int version = 6);
00057 virtual ~FWEveView();
00058
00059 virtual void setFrom(const FWConfiguration&);
00060 virtual void setBackgroundColor(Color_t);
00061 virtual void eventEnd();
00062 virtual void eventBegin();
00063
00064 virtual void setContext(const fireworks::Context& x);
00065 const fireworks::Context& context() { return *m_context; }
00066
00067
00068
00069 virtual void addTo(FWConfiguration&) const;
00070 virtual FWViewContextMenuHandlerBase* contextMenuHandler() const;
00071 virtual void saveImageTo(const std::string& iName) const;
00072 virtual void populateController(ViewerParameterGUI&) const;
00073
00074 TGLViewer* viewerGL() const;
00075 TEveViewer* viewer() { return m_viewer; }
00076 TEveScene* eventScene() { return m_eventScene;}
00077 TEveScene* geoScene() { return m_geoScene; }
00078
00079 TEveElement* ownedProducts() { return m_ownedProducts; }
00080 FWViewContext* viewContext() { return m_viewContext.get(); }
00081
00082
00083
00084 virtual void useGlobalEnergyScaleChanged();
00085 virtual bool isEnergyScaleGlobal() const;
00086 virtual void setupEnergyScale();
00087 virtual void voteCaloMaxVal();
00088
00089 protected:
00090 virtual void resetCamera();
00091 virtual void pointLineScalesChanged();
00092 virtual void cameraGuideChanged();
00093
00094
00095 virtual TEveCaloViz* getEveCalo() const { return 0; }
00096
00097
00098 void addToOrthoCamera(TGLOrthoCamera*, FWConfiguration&) const;
00099 void setFromOrthoCamera(TGLOrthoCamera*, const FWConfiguration&);
00100 void addToPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, FWConfiguration&) const;
00101 void setFromPerspectiveCamera(TGLPerspectiveCamera*, const std::string&, const FWConfiguration&);
00102
00103
00104 private:
00105 FWEveView(const FWEveView&);
00106 const FWEveView& operator=(const FWEveView&);
00107
00108
00109
00110
00111 TEveViewer* m_viewer;
00112 TEveScene* m_eventScene;
00113 TEveElement* m_ownedProducts;
00114 TEveScene* m_geoScene;
00115
00116 FWEventAnnotation* m_overlayEventInfo;
00117 CmsAnnotation* m_overlayLogo;
00118 ScaleAnnotation* m_energyMaxValAnnotation;
00119 TGLCameraGuide* m_cameraGuide;
00120
00121 const fireworks::Context* m_context;
00122
00123
00124
00125 private:
00126
00127 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,0)
00128 FWDoubleParameter m_imageScale;
00129 #endif
00130 FWEnumParameter m_eventInfoLevel;
00131 FWBoolParameter m_drawCMSLogo;
00132
00133 FWBoolParameter m_pointSmooth;
00134 FWDoubleParameter m_pointSize;
00135 FWBoolParameter m_lineSmooth;
00136 FWDoubleParameter m_lineWidth;
00137 FWDoubleParameter m_lineOutlineScale;
00138 FWDoubleParameter m_lineWireframeScale;
00139
00140 FWBoolParameter m_showCameraGuide;
00141 FWBoolParameter m_useGlobalEnergyScale;
00142
00143 boost::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
00144 std::auto_ptr<FWViewContext> m_viewContext;
00145 std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;
00146
00147 mutable FWViewEnergyScaleEditor* m_viewEnergyScaleEditor;
00148 };
00149
00150
00151 #endif