LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DrawingPad.cxx
Go to the documentation of this file.
1 #include "TPad.h"
7 
17 
20 
21 namespace evd {
22 
23  // Declare singleton HitSelector
24 
26 
36  DrawingPad::DrawingPad(const char* nm, const char* ti, double x1, double y1, double x2, double y2)
37  : fPad(0)
38  , fHeaderDraw(
39  0) //Every pointer checked for a 0 value in the destructor should be set to 0 here. aoliv23@lsu.edu
40  , fSimulationDraw(0)
41  , fRawDataDraw(0)
42  , fRecoBaseDraw(0)
43  , fAnalysisBaseDraw(0)
44  {
45  fPad = new TPad(nm, ti, x1, y1, x2, y2);
46  fPad->Draw();
47  fPad->cd();
48  }
49 
50  //......................................................................
51 
53  {
54  if (fHeaderDraw) {
55  delete fHeaderDraw;
56  fHeaderDraw = 0;
57  }
58  if (fSimulationDraw) {
59  delete fSimulationDraw;
60  fSimulationDraw = 0;
61  }
62  if (fRawDataDraw) {
63  delete fRawDataDraw;
64  fRawDataDraw = 0;
65  }
66  if (fRecoBaseDraw) {
67  delete fRecoBaseDraw;
68  fRecoBaseDraw = 0;
69  }
70  if (fAnalysisBaseDraw) {
71  delete fAnalysisBaseDraw;
73  }
74  // if (fHitSelector) { delete fHitSelector; fHitSelector = 0; }
75  if (fPad) {
76  delete fPad;
77  fPad = 0;
78  }
79  }
80 
81  // //......................................................................
82 
83  //......................................................................
84 
89  {
90  if (fHeaderDraw == 0) fHeaderDraw = new HeaderDrawer();
91  return fHeaderDraw;
92  }
93 
98  {
99  if (fGeometryDraw == 0) {
101  const fhicl::ParameterSet& pset = layoutOptions->fParameterSet;
102 
103  fGeometryDraw = art::make_tool<evd_tool::IExperimentDrawer>(
104  pset.get<fhicl::ParameterSet>("Experiment3DDrawer"));
105  }
106  return fGeometryDraw.get();
107  }
108 
113  {
115  return fSimulationDraw;
116  }
117 
122  {
123  if (fRawDataDraw == 0) fRawDataDraw = new RawDataDrawer();
124  return fRawDataDraw;
125  }
126 
127  //......................................................................
128 
133  {
134  if (fRecoBaseDraw == 0) fRecoBaseDraw = new RecoBaseDrawer();
135  return fRecoBaseDraw;
136  }
137 
138  //......................................................................
139 
144  {
146  return fAnalysisBaseDraw;
147  }
148 
149  //......................................................................
150  //......................................................................
151 
156  {
157  if (gTheHitSelector == 0) gTheHitSelector = new HitSelector();
158  return gTheHitSelector;
159  }
160 
161 } // namespace
AnalysisBaseDrawer * AnalysisBaseDraw()
Definition: DrawingPad.cxx:143
Class to aid in the rendering of AnalysisBase objects.
Render the objects from the Simulation package.
HeaderDrawer * HeaderDraw()
Definition: DrawingPad.cxx:88
Aid in the rendering of RecoBase objects.
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
IExperimentDrawerPtr fGeometryDraw
Drawer for detector geometry.
Definition: DrawingPad.h:47
Float_t y2[n_points_geant4]
Definition: compare.C:26
AnalysisBaseDrawer * fAnalysisBaseDraw
Drawer for analysisbase objects.
Definition: DrawingPad.h:51
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:50
HitSelector * gTheHitSelector
Definition: DrawingPad.cxx:25
Base class for all event display drawing pads.
evd_tool::IExperimentDrawer * GeometryDraw()
Definition: DrawingPad.cxx:97
LArSoft includes.
RawDataDrawer * RawDataDraw()
Definition: DrawingPad.cxx:121
Class to perform operations needed to select hits and pass them to a cluster.
T get(std::string const &key) const
Definition: ParameterSet.h:314
Aid in the rendering of AnalysisBase objects.
RecoBaseDrawer * RecoBaseDraw()
Definition: DrawingPad.cxx:132
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:112
Class to aid in the rendering of RecoBase objects.
Class to aid in the rendering of RawData objects.
fhicl::ParameterSet const & fParameterSet
Render the objects from the Simulation package.
HitSelector * HitSelectorGet()
Definition: DrawingPad.cxx:155
Aid in the rendering of RawData objects.
Definition: RawDataDrawer.h:47
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:49
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:45
Float_t x2[n_points_geant4]
Definition: compare.C:26
This is the interface class for drawing 3D detector geometries.
DrawingPad(const char *nm, const char *ti, double x1, double y1, double y2, double x2)
Definition: DrawingPad.cxx:36
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:46
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:48