Belle II Software  release-05-02-19
DisplayRphi.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : DisplayRphi.h
5 // Section : TRG CDC
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to display CDC trigger information.
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #ifdef TRGCDC_DISPLAY
15 
16 #ifndef TRGCDCDisplayRphi_FLAG_
17 #define TRGCDCDisplayRphi_FLAG_
18 
19 #include <gtkmm.h>
20 #include "trg/cdc/Display.h"
21 #include "trg/cdc/DisplayDrawingAreaRphi.h"
22 
23 #ifdef TRGCDC_SHORT_NAMES
24 #define TCDisplayRphi TRGCDCDisplayRphi
25 #endif
26 
27 namespace Belle2_TRGCDC {
28  extern Belle2::TRGCDCDisplayHough* H0;
29  extern Belle2::TRGCDCDisplayHough* H1;
30 }
31 
32 namespace Belle2 {
38  class TRGCDCDisplay;
39  class TRGCDCWireHit;
40 
42  class TRGCDCDisplayRphi : public TRGCDCDisplay {
43 
44  public:
46  TRGCDCDisplayRphi(const std::string& name = "TRGCDCDisplayRphi",
47  double innerR = 160,
48  double outerR = 1137,
49  int size = 600);
50 
52  virtual ~TRGCDCDisplayRphi();
53 
54  public: // display control
55 
57  double scale(void) const;
58 
60  double scale(double);
61 
63  bool axial(void) const;
64 
66  bool stereo(void) const;
67 
68  private: // Actions
69  virtual void on_scale_value_changed(void);
70  virtual void on_positionReset(void) override;
71  virtual void on_axial(void);
72  virtual void on_stereo(void);
73  virtual void on_wireName(void) override;
74  virtual void on_BelleCDC(void);
75 
76  public: // Access to drawing area.
77 
79  virtual TRGCDCDisplayDrawingAreaRphi& area(void);
80 
81  private: // GTK stuff
82  bool _axial;
83  bool _stereo;
84  TRGCDCDisplayDrawingAreaRphi _w;
85  Gtk::Adjustment _adjustment;
86  Gtk::HScale _scaler;
87  Gtk::CheckButton _buttonAxial;
88  Gtk::CheckButton _buttonStereo;
89  Gtk::CheckButton _buttonBelleCDC;
90  };
91 
92 //-----------------------------------------------------------------------------
93 
94  inline
95  TRGCDCDisplayDrawingAreaRphi&
96  TRGCDCDisplayRphi::area(void)
97  {
98  return _w;
99  }
100 
101  inline
102  bool
103  TRGCDCDisplayRphi::axial(void) const
104  {
105  return _axial;
106  }
107 
108  inline
109  bool
110  TRGCDCDisplayRphi::stereo(void) const
111  {
112  return _stereo;
113  }
114 
115  inline
116  double
117  TRGCDCDisplayRphi::scale(void) const
118  {
119  return _scaler.get_value();
120  }
121 
122  inline
123  double
124  TRGCDCDisplayRphi::scale(double a)
125  {
126  _scaler.set_value(a);
127  return _scaler.get_value();
128  }
129 
131 } // namespace Belle2
132 
133 #endif // TRGCDCDisplayRphi_FLAG_
134 #endif
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19