CMS 3D CMS Logo

CmsShowCommon.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_CmsShowCommon_h
2 #define Fireworks_Core_CmsShowCommon_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : CmsShowCommon
7 //
16 //
17 // Original Author: Alja Mrak-Tadel
18 // Created: Fri Sep 10 14:51:07 CEST 2010
19 //
20 
21 #include <sigc++/signal.h>
22 #include <sigc++/sigc++.h>
23 
24 #include "Rtypes.h"
25 #include "TGLUtil.h"
26 #include "TEveVector.h"
27 
35 
36 class CmsShowCommonPopup;
37 class FWViewEnergyScale;
38 class FWColorManager;
39 namespace fireworks {
40  class Context;
41 }
42 
44  friend class CmsShowCommonPopup;
45 
46 public:
48  ~CmsShowCommon() override;
49 
50  // ---------- const member functions ---------------------
51  void addTo(FWConfiguration&) const override;
52 
53  // ---------- static member functions --------------------
54 
55  // ---------- member functions ---------------------------
56  void setFrom(const FWConfiguration&) override;
57 
58  void setTrackBreakMode();
59  void setDrawBreakMarkers();
60 
61  int gamma() { return m_gamma.value(); }
62  void setGamma();
63  void switchBackground();
64  void permuteColors();
65  void randomizeColors();
66  void loopPalettes();
67 
68  void setGeomColor(FWGeomColorIndex, Color_t);
69  void setGeomTransparency(int val, bool projected);
71 
72  const TGLColorSet& getLightColorSet() const { return m_lightColorSet; }
73  const TGLColorSet& getDarkColorSet() const { return m_darkColorSet; }
74 
75  UChar_t getProjTrackBreaking() const { return m_trackBreak.value(); }
76  bool getRnrPTBMarkers() const { return m_drawBreakPoints.value(); }
77 
79 
80  void getEventCenter(float* inC) const;
81  void setEventCenter(float, float, float);
82  void resetEventCenter();
83 
84  mutable sigc::signal<void, const CmsShowCommon*> eventCenterChanged_;
85 
86 protected:
87  const FWColorManager* colorManager() const;
88  void setPalette();
89  // ---------- member data --------------------------------
90 
93 
96 
97  // general colors
98  mutable FWLongParameter m_backgroundColor; // can be set via Ctr+b key binding
101 
102  // geom colors
106 
107  TGLColorSet m_lightColorSet;
108  TGLColorSet m_darkColorSet;
109 
111 
113  TEveVector m_externalEventCenter; //cached
114 
115 private:
116  CmsShowCommon(const CmsShowCommon&) = delete; // stop default
117  const CmsShowCommon& operator=(const CmsShowCommon&) = delete; // stop default
118 };
119 
120 #endif
CmsShowCommon::getLightColorSet
const TGLColorSet & getLightColorSet() const
Definition: CmsShowCommon.h:72
CmsShowCommon::m_context
fireworks::Context * m_context
Definition: CmsShowCommon.h:92
FWEnumParameter
Definition: FWEnumParameter.h:30
fireworks::Context
Definition: Context.h:41
FWGenericParameterWithRange
Definition: FWGenericParameterWithRange.h:27
CmsShowCommon::m_view
CmsShowCommonPopup * m_view
Definition: CmsShowCommon.h:91
FWBoolParameter.h
CmsShowCommon::operator=
const CmsShowCommon & operator=(const CmsShowCommon &)=delete
CmsShowCommonPopup
Definition: CmsShowCommonPopup.h:25
CmsShowCommon::getRnrPTBMarkers
bool getRnrPTBMarkers() const
Definition: CmsShowCommon.h:76
CmsShowCommon::m_geomColors
FWLongParameter * m_geomColors[kFWGeomColorSize]
Definition: CmsShowCommon.h:105
CmsShowCommon::m_externalEventCenter
TEveVector m_externalEventCenter
Definition: CmsShowCommon.h:113
Context
CmsShowCommon::getProjTrackBreaking
UChar_t getProjTrackBreaking() const
Definition: CmsShowCommon.h:75
DDAxes::x
FWConfigurableParameterizable.h
CmsShowCommon::m_useBeamSpot
bool m_useBeamSpot
Definition: CmsShowCommon.h:112
CmsShowCommon::getDarkColorSet
const TGLColorSet & getDarkColorSet() const
Definition: CmsShowCommon.h:73
FWGenericParameter
Definition: FWGenericParameter.h:31
CmsShowCommon::m_palette
FWEnumParameter m_palette
Definition: CmsShowCommon.h:100
FWViewContext.h
CmsShowCommon::switchBackground
void switchBackground()
Definition: CmsShowCommon.cc:108
CmsShowCommon::m_geomTransparency3D
FWLongParameter m_geomTransparency3D
Definition: CmsShowCommon.h:104
CmsShowCommon::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: CmsShowCommon.h:70
CmsShowCommon::setGamma
void setGamma()
Definition: CmsShowCommon.cc:106
FWColorManager.h
CmsShowCommon::m_gamma
FWLongParameter m_gamma
Definition: CmsShowCommon.h:99
CmsShowCommon::setGeomTransparency
void setGeomTransparency(int val, bool projected)
Definition: CmsShowCommon.cc:159
CmsShowCommon::setEventCenter
void setEventCenter(float, float, float)
Definition: CmsShowCommon.cc:307
CmsShowCommon::resetEventCenter
void resetEventCenter()
Definition: CmsShowCommon.cc:313
FWLongParameter.h
CmsShowCommon::loopPalettes
void loopPalettes()
Definition: CmsShowCommon.cc:278
FWConfigurableParameterizable
Definition: FWConfigurableParameterizable.h:29
CmsShowCommon::setDrawBreakMarkers
void setDrawBreakMarkers()
Definition: CmsShowCommon.cc:97
FWEnumParameter.h
CmsShowCommon::randomizeColors
void randomizeColors()
Definition: CmsShowCommon.cc:137
CmsShowCommon::addTo
void addTo(FWConfiguration &) const override
Definition: CmsShowCommon.cc:199
FWColorManager
Definition: FWColorManager.h:45
CmsShowCommon::setTrackBreakMode
void setTrackBreakMode()
Definition: CmsShowCommon.cc:88
FWViewContext
Definition: FWViewContext.h:32
FWGenericParameter::value
T value() const
Definition: FWGenericParameter.h:50
CmsShowCommon::m_backgroundColor
FWLongParameter m_backgroundColor
Definition: CmsShowCommon.h:98
CmsShowCommon::setView
void setView(CmsShowCommonPopup *x)
Definition: CmsShowCommon.h:78
CmsShowCommon::gamma
int gamma()
Definition: CmsShowCommon.h:61
CmsShowCommon::colorManager
const FWColorManager * colorManager() const
Definition: CmsShowCommon.cc:83
heppy_batch.val
val
Definition: heppy_batch.py:351
CmsShowCommon::m_darkColorSet
TGLColorSet m_darkColorSet
Definition: CmsShowCommon.h:108
CmsShowCommon::m_geomTransparency2D
FWLongParameter m_geomTransparency2D
Definition: CmsShowCommon.h:103
FWViewEnergyScale
Definition: FWViewEnergyScale.h:34
FWBeamSpot.h
kFWGeomColorSize
Definition: FWColorManager.h:42
CmsShowCommon::m_drawBreakPoints
FWBoolParameter m_drawBreakPoints
Definition: CmsShowCommon.h:95
FWConfiguration
Definition: FWConfiguration.h:31
fireworks
Definition: FWTauProxyBuilderBase.h:35
CmsShowCommon
Definition: CmsShowCommon.h:43
CmsShowCommon::m_lightColorSet
TGLColorSet m_lightColorSet
Definition: CmsShowCommon.h:107
CmsShowCommon::CmsShowCommon
CmsShowCommon(fireworks::Context *)
Definition: CmsShowCommon.cc:40
CmsShowCommon::setFrom
void setFrom(const FWConfiguration &) override
Definition: CmsShowCommon.cc:213
CmsShowCommon::setGeomColor
void setGeomColor(FWGeomColorIndex, Color_t)
Definition: CmsShowCommon.cc:154
FWViewContext::getEnergyScale
FWViewEnergyScale * getEnergyScale() const
Definition: FWViewContext.cc:25
CmsShowCommon::m_trackBreak
FWEnumParameter m_trackBreak
Definition: CmsShowCommon.h:94
CmsShowCommon::eventCenterChanged_
sigc::signal< void, const CmsShowCommon * > eventCenterChanged_
Definition: CmsShowCommon.h:84
FWGeomColorIndex
FWGeomColorIndex
Definition: FWColorManager.h:32
CmsShowCommon::getEventCenter
void getEventCenter(float *inC) const
Definition: CmsShowCommon.cc:294
CmsShowCommon::~CmsShowCommon
~CmsShowCommon() override
Definition: CmsShowCommon.cc:81
CmsShowCommon::setPalette
void setPalette()
Definition: CmsShowCommon.cc:260
CmsShowCommon::permuteColors
void permuteColors()
Definition: CmsShowCommon.cc:113
CmsShowCommon::m_viewContext
FWViewContext m_viewContext
Definition: CmsShowCommon.h:110