LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evd::DrawingPad Class Reference

Base class for event display drawing pads. More...

#include "DrawingPad.h"

Inheritance diagram for evd::DrawingPad:
evd::CalorPad evd::Display3DPad evd::HeaderPad evd::MCBriefPad evd::Ortho3DPad evd::TQPad evd::TWireProjPad

Public Member Functions

 DrawingPad (const char *nm, const char *ti, double x1, double y1, double y2, double x2)
 
 ~DrawingPad ()
 
TPad * Pad ()
 
HeaderDrawerHeaderDraw ()
 
evd_tool::IExperimentDrawerGeometryDraw ()
 
SimulationDrawerSimulationDraw ()
 
RawDataDrawerRawDataDraw ()
 
RecoBaseDrawerRecoBaseDraw ()
 
AnalysisBaseDrawerAnalysisBaseDraw ()
 
HitSelectorHitSelectorGet ()
 

Protected Types

using IExperimentDrawerPtr = std::unique_ptr< evd_tool::IExperimentDrawer >
 

Protected Attributes

TPad * fPad
 The ROOT graphics pad. More...
 
HeaderDrawerfHeaderDraw
 Drawer for event header info. More...
 
IExperimentDrawerPtr fGeometryDraw
 Drawer for detector geometry. More...
 
SimulationDrawerfSimulationDraw
 Drawer for simulation objects. More...
 
RawDataDrawerfRawDataDraw
 Drawer for raw data. More...
 
RecoBaseDrawerfRecoBaseDraw
 Drawer for recobase objects. More...
 
AnalysisBaseDrawerfAnalysisBaseDraw
 Drawer for analysisbase objects. More...
 

Detailed Description

Base class for event display drawing pads.

Definition at line 27 of file DrawingPad.h.

Member Typedef Documentation

Definition at line 43 of file DrawingPad.h.

Constructor & Destructor Documentation

evd::DrawingPad::DrawingPad ( const char *  nm,
const char *  ti,
double  x1,
double  y1,
double  x2,
double  y2 
)

Create a drawing pad for the event display

Parameters
nm: Name of the TPad
ti: Title of the TPad
x1: Relative x position (0-1) of lower left corner
y1: Relative y position (0-1) of lower left corner
x2: Relative x position (0-1) of upper right corner
y2: Relative y position (0-1) of upper right corner

Definition at line 36 of file DrawingPad.cxx.

References fPad.

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)
44  {
45  fPad = new TPad(nm, ti, x1, y1, x2, y2);
46  fPad->Draw();
47  fPad->cd();
48  }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
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
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
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:46
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:48
evd::DrawingPad::~DrawingPad ( )

Definition at line 52 of file DrawingPad.cxx.

References fAnalysisBaseDraw, fHeaderDraw, fPad, fRawDataDraw, fRecoBaseDraw, and fSimulationDraw.

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  }
AnalysisBaseDrawer * fAnalysisBaseDraw
Drawer for analysisbase objects.
Definition: DrawingPad.h:51
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:50
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:49
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:45
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:46
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:48

Member Function Documentation

AnalysisBaseDrawer * evd::DrawingPad::AnalysisBaseDraw ( )

Provide access to the drawer for AnalysisBase classes

Definition at line 143 of file DrawingPad.cxx.

References fAnalysisBaseDraw.

Referenced by evd::CalorPad::Draw().

144  {
145  if (fAnalysisBaseDraw == 0) fAnalysisBaseDraw = new AnalysisBaseDrawer();
146  return fAnalysisBaseDraw;
147  }
AnalysisBaseDrawer * fAnalysisBaseDraw
Drawer for analysisbase objects.
Definition: DrawingPad.h:51
evd_tool::IExperimentDrawer * evd::DrawingPad::GeometryDraw ( )

Provide access to the drawer for the detector geometry

Definition at line 97 of file DrawingPad.cxx.

References fGeometryDraw, evd::EvdLayoutOptions::fParameterSet, and fhicl::ParameterSet::get().

Referenced by evd::Display3DPad::Draw().

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  }
IExperimentDrawerPtr fGeometryDraw
Drawer for detector geometry.
Definition: DrawingPad.h:47
T get(std::string const &key) const
Definition: ParameterSet.h:314
fhicl::ParameterSet const & fParameterSet
HeaderDrawer * evd::DrawingPad::HeaderDraw ( )

Provide access to the drawer for the detector geometry

Definition at line 88 of file DrawingPad.cxx.

References fHeaderDraw.

Referenced by evd::HeaderPad::Draw().

89  {
90  if (fHeaderDraw == 0) fHeaderDraw = new HeaderDrawer();
91  return fHeaderDraw;
92  }
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:46
HitSelector * evd::DrawingPad::HitSelectorGet ( )

Provide access to the HitSelector

Definition at line 155 of file DrawingPad.cxx.

References evd::gTheHitSelector.

Referenced by evd::TWireProjPad::ClearHitList(), evd::TWireProjPad::Draw(), evd::TWireProjPad::SaveHitList(), evd::TWireProjPad::SaveSeedList(), and evd::TWireProjPad::SelectOneHit().

156  {
157  if (gTheHitSelector == 0) gTheHitSelector = new HitSelector();
158  return gTheHitSelector;
159  }
HitSelector * gTheHitSelector
Definition: DrawingPad.cxx:25
RawDataDrawer * evd::DrawingPad::RawDataDraw ( )

Provide access to the drawer for the RawData classes

Definition at line 121 of file DrawingPad.cxx.

References fRawDataDraw.

Referenced by evd::TQPad::BookHistogram(), evd::TQPad::Draw(), evd::TWireProjPad::Draw(), evd::TWireProjPad::ShowFull(), and evd::TWireProjPad::TWireProjPad().

122  {
123  if (fRawDataDraw == 0) fRawDataDraw = new RawDataDrawer();
124  return fRawDataDraw;
125  }
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:49
RecoBaseDrawer * evd::DrawingPad::RecoBaseDraw ( )

Provide access to the drawer for RecoBase classes

Definition at line 132 of file DrawingPad.cxx.

References fRecoBaseDraw.

Referenced by evd::Display3DPad::Draw(), evd::TWireProjPad::Draw(), evd::Ortho3DPad::Draw(), and evd::TWireProjPad::ShowFull().

133  {
134  if (fRecoBaseDraw == 0) fRecoBaseDraw = new RecoBaseDrawer();
135  return fRecoBaseDraw;
136  }
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:50
SimulationDrawer * evd::DrawingPad::SimulationDraw ( )

Provide access to the drawer for the Simulation classes

Definition at line 112 of file DrawingPad.cxx.

References fSimulationDraw.

Referenced by evd::MCBriefPad::Draw(), evd::TWireProjPad::Draw(), and evd::Ortho3DPad::Draw().

113  {
114  if (fSimulationDraw == 0) fSimulationDraw = new SimulationDrawer();
115  return fSimulationDraw;
116  }
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:48

Member Data Documentation

AnalysisBaseDrawer* evd::DrawingPad::fAnalysisBaseDraw
protected

Drawer for analysisbase objects.

Definition at line 51 of file DrawingPad.h.

Referenced by AnalysisBaseDraw(), and ~DrawingPad().

IExperimentDrawerPtr evd::DrawingPad::fGeometryDraw
protected

Drawer for detector geometry.

Definition at line 47 of file DrawingPad.h.

Referenced by GeometryDraw().

HeaderDrawer* evd::DrawingPad::fHeaderDraw
protected

Drawer for event header info.

Definition at line 46 of file DrawingPad.h.

Referenced by HeaderDraw(), and ~DrawingPad().

RawDataDrawer* evd::DrawingPad::fRawDataDraw
protected

Drawer for raw data.

Definition at line 49 of file DrawingPad.h.

Referenced by RawDataDraw(), and ~DrawingPad().

RecoBaseDrawer* evd::DrawingPad::fRecoBaseDraw
protected

Drawer for recobase objects.

Definition at line 50 of file DrawingPad.h.

Referenced by RecoBaseDraw(), and ~DrawingPad().

SimulationDrawer* evd::DrawingPad::fSimulationDraw
protected

Drawer for simulation objects.

Definition at line 48 of file DrawingPad.h.

Referenced by SimulationDraw(), and ~DrawingPad().


The documentation for this class was generated from the following files: