LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Ortho3DPad.h
Go to the documentation of this file.
1 
8 #ifndef EVD_ORTHO3DPAD_H
9 #define EVD_ORTHO3DPAD_H
10 
11 #include "RQ_OBJECT.h"
14 #include <vector>
15 
16 #include "TBox.h"
17 class TH1F;
18 class TGNumberEntry;
19 
20 namespace evdb {
21  class View2D;
22 }
23 
24 namespace evd {
25 
27 
28  class Ortho3DPad : public DrawingPad {
29  public:
30  // So this class can receive gui signals.
31 
32  RQ_OBJECT("evd::Ortho3DPad")
33 
34  public:
35  // Constructor, destructor.
36 
37  Ortho3DPad(const char* nm,
38  const char* ti,
40  double x1,
41  double y1,
42  double x2,
43  double y2);
44  ~Ortho3DPad();
45 
46  // Accessors.
47 
48  double GetMarkerSize() const { return 4. * fMSize; } // Size in pixels.
49 
50  // Methods.
51 
52  void Draw(const char* opt = 0);
53  void SetZoom(double xlo, double ylo, double xhi, double yhi, bool update);
54  void UnZoom(bool update);
55  void SetMarkerSize(double size, bool update); // Size in pixels.
56 
57  // Widget-related methods.
58 
59  void SetMSizeEntry(TGNumberEntry* p); // Add number entry widget.
60  void SetMSize(); // Slot for marker size signals.
61 
62  // Handler for mouse events.
63 
64  static void MouseEvent(evd::Ortho3DPad* p);
65  void MouseEvent();
66 
67  private:
68  // Static attributes.
69 
71 
72  // Attributes.
73 
74  TH1F* fHisto;
76  double fXLo;
77  double fXHi;
78  double fYLo;
79  double fYHi;
80  double fMSize;
81  std::vector<TBox> TPCBox;
83 
84  // Widgets.
85 
86  TGNumberEntry* fMSizeEntry;
87 
88  // Mouse/zoom status attributes.
89 
90  bool fPress;
91  bool fBoxDrawn;
92  int fPressPx;
93  int fPressPy;
94  int fCurrentPx;
95  int fCurrentPy;
96  double fPressX;
97  double fPressY;
98  double fReleaseX;
99  double fReleaseY;
100  };
101 }
102 
103 #endif
104 
double fXHi
High x value.
Definition: Ortho3DPad.h:77
int fPressPy
Poxel location where button 1 was pressed.
Definition: Ortho3DPad.h:93
Define OrthoProj_t enum for selecting orthographic view.
Float_t y1[n_points_granero]
Definition: compare.C:5
double fReleaseX
User location where button 1 was released.
Definition: Ortho3DPad.h:98
Float_t x1[n_points_granero]
Definition: compare.C:5
gr2 SetMarkerSize(0.5)
hist1 Draw("HIST")
double fYHi
High y value.
Definition: Ortho3DPad.h:79
A drawing pad showing an orthographic rendering of 3D objects.
Definition: Ortho3DPad.h:28
int fCurrentPy
Current pixel location of mouse.
Definition: Ortho3DPad.h:95
int fPressPx
Pixel location where button 1 was pressed.
Definition: Ortho3DPad.h:92
OrthoProj_t
Definition: OrthoProj.h:12
Manage all things related to colors for the event display.
double fXLo
Low x value.
Definition: Ortho3DPad.h:76
Float_t y2[n_points_geant4]
Definition: compare.C:26
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:101
Base class for all event display drawing pads.
double fReleaseY
User location where button 1 was released.
Definition: Ortho3DPad.h:99
LArSoft includes.
evd::OrthoProj_t fProj
Projection.
Definition: Ortho3DPad.h:75
bool fBoxDrawn
Is selection box drawn?
Definition: Ortho3DPad.h:91
double fYLo
Low y value.
Definition: Ortho3DPad.h:78
Base class for event display drawing pads.
Definition: DrawingPad.h:27
double fPressX
User location where button 1 was pressed.
Definition: Ortho3DPad.h:96
double fPressY
User location where button 1 was pressed.
Definition: Ortho3DPad.h:97
int fCurrentPx
Current pixel location of mouse.
Definition: Ortho3DPad.h:94
std::vector< TBox > TPCBox
TPC box.
Definition: Ortho3DPad.h:81
double GetMarkerSize() const
Definition: Ortho3DPad.h:48
Float_t proj
Definition: plot.C:35
TH1F * fHisto
Enclosing histogram.
Definition: Ortho3DPad.h:74
bool fPress
Is button 1 pressed?
Definition: Ortho3DPad.h:90
Float_t x2[n_points_geant4]
Definition: compare.C:26
static Ortho3DPad * fMousePad
Selected pad for mouse action.
Definition: Ortho3DPad.h:70
TGNumberEntry * fMSizeEntry
For changing marker size.
Definition: Ortho3DPad.h:86
evdb::View2D * fView
Collection of graphics objects to render.
Definition: Ortho3DPad.h:82
double fMSize
Marker size.
Definition: Ortho3DPad.h:80