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