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