Belle II Software development
DisplayRphi.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//-----------------------------------------------------------------------------
10// Description : A class to display CDC trigger information.
11//-----------------------------------------------------------------------------
12
13#ifdef TRGCDC_DISPLAY
14
15#ifndef TRGCDCDisplayRphi_FLAG_
16#define TRGCDCDisplayRphi_FLAG_
17
18#include <gtkmm.h>
19#include "trg/cdc/Display.h"
20#include "trg/cdc/DisplayDrawingAreaRphi.h"
21
22#ifdef TRGCDC_SHORT_NAMES
23#define TCDisplayRphi TRGCDCDisplayRphi
24#endif
25
26namespace Belle2_TRGCDC {
27 extern Belle2::TRGCDCDisplayHough* H0;
28 extern Belle2::TRGCDCDisplayHough* H1;
29}
30
31namespace Belle2 {
37 class TRGCDCDisplay;
38 class TRGCDCWireHit;
39
41 class TRGCDCDisplayRphi : public TRGCDCDisplay {
42
43 public:
45 TRGCDCDisplayRphi(const std::string& name = "TRGCDCDisplayRphi",
46 double innerR = 160,
47 double outerR = 1137,
48 int size = 600);
49
51 virtual ~TRGCDCDisplayRphi();
52
53 public: // display control
54
56 double scale(void) const;
57
59 double scale(double);
60
62 bool axial(void) const;
63
65 bool stereo(void) const;
66
67 private: // Actions
68 virtual void on_scale_value_changed(void);
69 virtual void on_positionReset(void) override;
70 virtual void on_axial(void);
71 virtual void on_stereo(void);
72 virtual void on_wireName(void) override;
73 virtual void on_BelleCDC(void);
74
75 public: // Access to drawing area.
76
78 virtual TRGCDCDisplayDrawingAreaRphi& area(void);
79
80 private: // GTK stuff
81 bool _axial;
82 bool _stereo;
83 TRGCDCDisplayDrawingAreaRphi _w;
84 Gtk::Adjustment _adjustment;
85 Gtk::HScale _scaler;
86 Gtk::CheckButton _buttonAxial;
87 Gtk::CheckButton _buttonStereo;
88 Gtk::CheckButton _buttonBelleCDC;
89 };
90
91//-----------------------------------------------------------------------------
92
93 inline
94 TRGCDCDisplayDrawingAreaRphi&
95 TRGCDCDisplayRphi::area(void)
96 {
97 return _w;
98 }
99
100 inline
101 bool
102 TRGCDCDisplayRphi::axial(void) const
103 {
104 return _axial;
105 }
106
107 inline
108 bool
109 TRGCDCDisplayRphi::stereo(void) const
110 {
111 return _stereo;
112 }
113
114 inline
115 double
116 TRGCDCDisplayRphi::scale(void) const
117 {
118 return _scaler.get_value();
119 }
120
121 inline
122 double
123 TRGCDCDisplayRphi::scale(double a)
124 {
125 _scaler.set_value(a);
126 return _scaler.get_value();
127 }
128
130} // namespace Belle2
131
132#endif // TRGCDCDisplayRphi_FLAG_
133#endif
Abstract base class for different kinds of events.