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 {
41 class Context;
42 }
43 
45 {
46  friend class CmsShowCommonPopup;
47 
48 public:
50  ~CmsShowCommon() override;
51 
52  // ---------- const member functions ---------------------
53  void addTo(FWConfiguration&) const override;
54 
55  // ---------- static member functions --------------------
56 
57  // ---------- member functions ---------------------------
58  void setFrom(const FWConfiguration&) override;
59 
60  void setTrackBreakMode();
61  void setDrawBreakMarkers();
62 
63  int gamma() { return m_gamma.value(); }
64  void setGamma();
65  void switchBackground();
66  void permuteColors();
67  void randomizeColors();
68  void loopPalettes();
69 
70  void setGeomColor(FWGeomColorIndex, Color_t);
71  void setGeomTransparency(int val, bool projected);
72  FWViewEnergyScale* getEnergyScale() const { return m_viewContext.getEnergyScale(); }
73 
74 
75  const TGLColorSet& getLightColorSet() const { return m_lightColorSet; }
76  const TGLColorSet& getDarkColorSet() const { return m_darkColorSet; }
77 
78 
79  UChar_t getProjTrackBreaking() const { return m_trackBreak.value(); }
80  bool getRnrPTBMarkers() const { return m_drawBreakPoints.value(); }
81 
82  void setView(CmsShowCommonPopup* x) { m_view= x;}
83 
84  void getEventCenter(float* inC) const;
85  void setEventCenter(float, float, float);
86  void resetEventCenter();
87 
88  mutable sigc::signal<void, const CmsShowCommon*> eventCenterChanged_;
89 
90 protected:
91  const FWColorManager* colorManager() const;
92  void setPalette();
93  // ---------- member data --------------------------------
94 
95 
98 
101 
102  // general colors
103  mutable FWLongParameter m_backgroundColor; // can be set via Ctr+b key binding
106 
107  // geom colors
111 
112  TGLColorSet m_lightColorSet;
113  TGLColorSet m_darkColorSet;
114 
116 
118  TEveVector m_externalEventCenter; //cached
119 
120 private:
121  CmsShowCommon(const CmsShowCommon&) = delete; // stop default
122  const CmsShowCommon& operator=(const CmsShowCommon&) = delete; // stop default
123 
124 };
125 
126 
127 #endif
TGLColorSet m_lightColorSet
bool getRnrPTBMarkers() const
Definition: CmsShowCommon.h:80
sigc::signal< void, const CmsShowCommon * > eventCenterChanged_
Definition: CmsShowCommon.h:88
const CmsShowCommonPopup & operator=(const CmsShowCommonPopup &)
FWBoolParameter m_drawBreakPoints
FWLongParameter m_backgroundColor
FWGeomColorIndex
FWLongParameter m_gamma
UChar_t getProjTrackBreaking() const
Definition: CmsShowCommon.h:79
TEveVector m_externalEventCenter
const TGLColorSet & getLightColorSet() const
Definition: CmsShowCommon.h:75
fireworks::Context * m_context
Definition: CmsShowCommon.h:97
FWLongParameter m_geomTransparency3D
FWViewContext m_viewContext
FWLongParameter m_geomTransparency2D
FWViewEnergyScale * getEnergyScale() const
Definition: CmsShowCommon.h:72
CmsShowCommonPopup * m_view
Definition: CmsShowCommon.h:96
const TGLColorSet & getDarkColorSet() const
Definition: CmsShowCommon.h:76
TGLColorSet m_darkColorSet
FWEnumParameter m_trackBreak
Definition: CmsShowCommon.h:99
void setView(CmsShowCommonPopup *x)
Definition: CmsShowCommon.h:82
FWEnumParameter m_palette