Belle II Software  release-05-01-25
DisplayHough.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : DisplayHough.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 TRGCDCDisplayHough_FLAG_
17 #define TRGCDCDisplayHough_FLAG_
18 
19 #include <gtkmm.h>
20 #include "trg/cdc/Display.h"
21 #include "trg/cdc/DisplayDrawingAreaHough.h"
22 
23 #ifdef TRGCDC_SHORT_NAMES
24 #define TCDisplayHough TRGCDCDisplayHough
25 #endif
26 
27 namespace Belle2_TRGCDC {
28  extern Belle2::TRGCDCDisplayRphi* D;
29 }
30 
31 namespace Belle2 {
37  class TRGCDCDisplayRphi;
38 
40  class TRGCDCDisplayHough : public TRGCDCDisplay {
41 
42  public:
43 
45  TRGCDCDisplayHough(const std::string& name = "TRGCDCDisplayHough",
46  int size = 600);
47 
49  virtual ~TRGCDCDisplayHough();
50 
51  public: // display control
52 
54  double scale(void) const;
55 
57  double scale(double);
58 
59  private: // Actions
60 
62  virtual void on_scale_value_changed(void);
63 
65  virtual void on_positionReset(void) override;
66 
67  public: // Access to drawing area.
68 
70  TRGCDCDisplayDrawingAreaHough& area(void);
71 
72  private: // GTK stuff
73  TRGCDCDisplayDrawingAreaHough _w;
74  Gtk::Adjustment _adjustment;
75  Gtk::HScale _scaler;
76 
77  };
78 
79 //-----------------------------------------------------------------------------
80 
81  inline
82  TRGCDCDisplayDrawingAreaHough&
83  TRGCDCDisplayHough::area(void)
84  {
85  return _w;
86  }
87 
88  inline
89  double
90  TRGCDCDisplayHough::scale(void) const
91  {
92  return _scaler.get_value();
93  }
94 
95  inline
96  double
97  TRGCDCDisplayHough::scale(double a)
98  {
99  _scaler.set_value(a);
100  return _scaler.get_value();
101  }
102 
104 } // namespace Belle2
105 
106 #endif // TRGCDCDisplayHough_FLAG_
107 #endif
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19