LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DrawingPad.cxx
Go to the documentation of this file.
7 #include <iostream>
8 #include <vector>
9 #include "TPad.h"
19 
23 
24 namespace evd{
25 
26  // Declare singleton HitSelector
27 
29 
39  DrawingPad::DrawingPad(const char* nm,
40  const char* ti,
41  double x1, double y1,
42  double x2, double y2)
43  : fPad(0)
44  , fHeaderDraw(0) //Every pointer checked for a 0 value in the destructor should be set to 0 here. aoliv23@lsu.edu
45  , fSimulationDraw(0)
46  , fRawDataDraw(0)
47  , fRecoBaseDraw(0)
48  , fAnalysisBaseDraw(0)
49  {
50  fPad = new TPad(nm,ti,x1,y1,x2,y2);
51  fPad->Draw();
52  fPad->cd();
53  }
54 
55  //......................................................................
56 
58  {
59  if (fHeaderDraw) { delete fHeaderDraw; fHeaderDraw = 0; }
60  if (fSimulationDraw) { delete fSimulationDraw; fSimulationDraw = 0; }
61  if (fRawDataDraw) { delete fRawDataDraw; fRawDataDraw = 0; }
62  if (fRecoBaseDraw) { delete fRecoBaseDraw; fRecoBaseDraw = 0; }
64  // if (fHitSelector) { delete fHitSelector; fHitSelector = 0; }
65  if (fPad) { delete fPad; fPad = 0; }
66  }
67 
68  // //......................................................................
69 
70  //......................................................................
71 
76  {
77  if (fHeaderDraw==0) fHeaderDraw = new HeaderDrawer();
78  return fHeaderDraw;
79  }
80 
85  {
86  if (fGeometryDraw==0)
87  {
89  const fhicl::ParameterSet& pset = layoutOptions->fParameterSet;
90 
91  fGeometryDraw = art::make_tool<evd_tool::IExperimentDrawer>(pset.get<fhicl::ParameterSet>("Experiment3DDrawer"));
92  }
93  return fGeometryDraw.get();
94  }
95 
100  {
102  return fSimulationDraw;
103 
104  }
105 
110  {
111  if (fRawDataDraw==0) fRawDataDraw = new RawDataDrawer();
112  return fRawDataDraw;
113  }
114 
115  //......................................................................
116 
121  {
123  return fRecoBaseDraw;
124 
125  }
126 
127  //......................................................................
128 
133  {
135  return fAnalysisBaseDraw;
136  }
137 
138  //......................................................................
139  //......................................................................
140 
145  {
146  if (gTheHitSelector==0) gTheHitSelector = new HitSelector();
147  return gTheHitSelector;
148  }
149 
150 }// namespace
AnalysisBaseDrawer * AnalysisBaseDraw()
Definition: DrawingPad.cxx:132
Class to aid in the rendering of AnalysisBase objects.
Render the objects from the Simulation package.
HeaderDrawer * HeaderDraw()
Definition: DrawingPad.cxx:75
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:56
Float_t y2[n_points_geant4]
Definition: compare.C:26
AnalysisBaseDrawer * fAnalysisBaseDraw
Drawer for analysisbase objects.
Definition: DrawingPad.h:60
const fhicl::ParameterSet & fParameterSet
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:59
HitSelector * gTheHitSelector
Definition: DrawingPad.cxx:28
Base class for all event display drawing pads.
evd_tool::IExperimentDrawer * GeometryDraw()
Definition: DrawingPad.cxx:84
LArSoft includes.
RawDataDrawer * RawDataDraw()
Definition: DrawingPad.cxx:109
Class to perform operations needed to select hits and pass them to a cluster.
T get(std::string const &key) const
Definition: ParameterSet.h:231
Aid in the rendering of AnalysisBase objects.
RecoBaseDrawer * RecoBaseDraw()
Definition: DrawingPad.cxx:120
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:99
Class to aid in the rendering of RecoBase objects.
Class to aid in the rendering of RawData objects.
Render the objects from the Simulation package.
HitSelector * HitSelectorGet()
Definition: DrawingPad.cxx:144
Aid in the rendering of RawData objects.
Definition: RawDataDrawer.h:40
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:58
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:53
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:39
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:54
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:57