TQPad.h
Go to the documentation of this file.
1 ///
2 /// \file TQPad.h
3 /// \brief Drawing pad for time or charge histograms
4 /// \author messier@indiana.edu
5 ///
6 #ifndef EVD_TQPAD_H
7 #define EVD_TQPAD_H
8 
10 
11 #include <memory>
12 
13 class TH1F;
14 
15 namespace evdb { class View2D; }
16 namespace evdb_tool
17 {
18  class IWaveformDrawer;
19  class IWFHitDrawer;
20 }
21 
22 namespace evd
23 {
24 class TQPad : public DrawingPad
25 {
26 public:
27  TQPad(const char* nm,
28  const char* ti,
29  double x1,
30  double y1,
31  double x2,
32  double y2,
33  const char* opt,
34  unsigned int plane,
35  unsigned int wire);
36 
37  ~TQPad();
38 
39  void Draw();
40 
41  void SetPlaneWire(unsigned int plane=0, unsigned int wire=0) { fPlane = plane; fWire = wire; }
42 
43 private:
44  void BookHistogram();
45 
46  using IWFHitDrawerPtr = std::unique_ptr<evdb_tool::IWFHitDrawer>;
47  using IWaveformDrawerPtr = std::unique_ptr<evdb_tool::IWaveformDrawer>;
48 
49  unsigned int fWire;
50  unsigned int fPlane; ///< Which plane in the detector
51  int fTQ; ///< 0 = plot shows charge only, 1 = plot shows charge vs time for a wire
52  TH1F* fFrameHist; ///< A dummy histogram to define the axes
53  evdb::View2D* fView; ///< Superimpose scale on 1D histo
54  IWFHitDrawerPtr fHitDrawerTool; ///< An instance of the tool to draw hits
55  IWaveformDrawerPtr fRawDigitDrawerTool; ///< An instance of the tool to draw hits
56  IWaveformDrawerPtr fWireDrawerTool; ///< An instance of the tool to draw hits
57  };
58 }
59 
60 #endif
61 ////////////////////////////////////////////////////////////////////////
IWFHitDrawerPtr fHitDrawerTool
An instance of the tool to draw hits.
Definition: TQPad.h:54
unsigned int fPlane
Which plane in the detector.
Definition: TQPad.h:50
TH1F * fFrameHist
A dummy histogram to define the axes.
Definition: TQPad.h:52
IWaveformDrawerPtr fWireDrawerTool
An instance of the tool to draw hits.
Definition: TQPad.h:56
opt
Definition: train.py:196
unsigned int fWire
Definition: TQPad.h:49
evdb::View2D * fView
Superimpose scale on 1D histo.
Definition: TQPad.h:53
LArSoft includes.
Definition: InfoTransfer.h:33
Base class for event display drawing pads.
Definition: DrawingPad.h:29
std::unique_ptr< evdb_tool::IWaveformDrawer > IWaveformDrawerPtr
Definition: TQPad.h:47
std::unique_ptr< evdb_tool::IWFHitDrawer > IWFHitDrawerPtr
Definition: TQPad.h:46
void Draw(const char *plot, const char *title)
Definition: gXSecComp.cxx:580
IWaveformDrawerPtr fRawDigitDrawerTool
An instance of the tool to draw hits.
Definition: TQPad.h:55
int fTQ
0 = plot shows charge only, 1 = plot shows charge vs time for a wire
Definition: TQPad.h:51
void SetPlaneWire(unsigned int plane=0, unsigned int wire=0)
Definition: TQPad.h:41