Public Member Functions | Protected Attributes | Private Attributes | List of all members
evd::HardwarePad Class Reference

A drawing pad for an XZ or ZY. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/EventDisplay/HardwarePad.h"

Inheritance diagram for evd::HardwarePad:
evd::DrawingPad

Public Member Functions

 HardwarePad (const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
 
 ~HardwarePad ()
 
void Draw (const char *opt=0)
 
void Config (int detid)
 
TPad * Pad ()
 
HeaderDrawerHeaderDraw ()
 
GeometryDrawerGeometryDraw ()
 
SimulationDrawerSimulationDraw ()
 
RawDataDrawerRawDataDraw ()
 
RecoBaseDrawerRecoBaseDraw ()
 

Protected Attributes

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

Private Attributes

int fDetId
 Which detector are we configured for? More...
 
TH2F * fHisto
 Histogram to draw object on. More...
 
evdb::View2DfView
 Collection of graphics objects to render. More...
 

Detailed Description

A drawing pad for an XZ or ZY.

Definition at line 18 of file HardwarePad.h.

Constructor & Destructor Documentation

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

Create a pad showing a single X-Z or Y-Z projection of the detector

Parameters
nm: Name of the pad
ti: Title of the pad
x1: Location of left edge of pad (0-1)
x2: Location of right edge of pad (0-1)
y1: Location of bottom edge of pad (0-1)
y2: Location of top edge of pad (0-1)
opt: Options. Include 'x', 'y' for xz or yz projections

Definition at line 35 of file HardwarePad.cxx.

References fView, and evd::DrawingPad::Pad().

39  :
40  DrawingPad(nm, ti, x1, x2, y1, y2),
41  fDetId(0),
42  fHisto(0)
43  {
44  this->Pad()->SetTopMargin (0.01);
45  this->Pad()->SetBottomMargin(0.11);
46  this->Pad()->SetLeftMargin (0.11);
47  this->Pad()->SetRightMargin (0.01);
48 
49  this->Pad()->SetBit(kCannotPick);
50  this->Pad()->SetBit(TPad::kCannotMove);
51 
52  fView = new evdb::View2D();
53  }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
static constexpr Double_t nm
Definition: Munits.h:133
TPad * Pad()
Definition: DrawingPad.h:27
evdb::View2D * fView
Collection of graphics objects to render.
Definition: HardwarePad.h:30
TH2F * fHisto
Histogram to draw object on.
Definition: HardwarePad.h:29
int fDetId
Which detector are we configured for?
Definition: HardwarePad.h:28
DrawingPad(const char *nm, const char *ti, double x1, double y1, double y2, double x2)
Definition: DrawingPad.cxx:34
evd::HardwarePad::~HardwarePad ( )

Definition at line 77 of file HardwarePad.cxx.

References fHisto, and fView.

78  {
79  if (fHisto) { delete fHisto; fHisto = 0; }
80  if (fView) { delete fView; fView = 0; }
81  }
evdb::View2D * fView
Collection of graphics objects to render.
Definition: HardwarePad.h:30
TH2F * fHisto
Histogram to draw object on.
Definition: HardwarePad.h:29

Member Function Documentation

void evd::HardwarePad::Config ( int  detid)

Definition at line 57 of file HardwarePad.cxx.

References fDetId, fHisto, daqchannelmap::HardwareDisplay::fXmax, daqchannelmap::HardwareDisplay::fYmax, hd, evd::DrawingPad::Pad(), and daqchannelmap::HardwareDisplay::SetupDet().

Referenced by Draw().

58  {
59  if (fDetId == detid) return;
60  fDetId = detid;
61 
62  if (fHisto) { delete fHisto; fHisto = 0; }
63 
65  hd.SetupDet(detid);
66 
67  unsigned int nx = hd.fXmax;
68  unsigned int ny = hd.fYmax;
69 
70  this->Pad()->cd();
71  fHisto = new TH2F("fHisto","",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
72  fHisto->Draw("AB");
73  }
unsigned int fXmax
Width of entire view.
TPad * Pad()
Definition: DrawingPad.h:27
unsigned int fYmax
Height of entire view.
TH2F * fHisto
Histogram to draw object on.
Definition: HardwarePad.h:29
int fDetId
Which detector are we configured for?
Definition: HardwarePad.h:28
TH1F * hd
Definition: Xdiff_gwt.C:57
void evd::HardwarePad::Draw ( const char *  opt = 0)

Definition at line 85 of file HardwarePad.cxx.

References evdb::View2D::Clear(), Config(), geo::GeometryBase::DetId(), evdb::View2D::Draw(), evt, fHisto, evd::DrawingPad::fPad, fView, evdb::EventHolder::GetEvent(), evdb::EventHolder::Instance(), evd::DrawingPad::RawDataDraw(), and evd::RawDataDrawer::RawDigitHardware().

Referenced by evd::HardwareView::Draw(), and evd::HardwareView::HardwareView().

86  {
87  fView->Clear();
89  if (evt==0) return;
90 
91  //
92  // Make sure we are configured for the right detector
93  //
95  this->Config(geo->DetId());
96  this->RawDataDraw()->RawDigitHardware(*evt, fView);
97 
98  fPad->Clear();
99  fPad->cd();
100  fHisto->Draw("AB");
101 
102  fView->Draw();
103  }
void RawDigitHardware(const art::Event &evt, evdb::View2D *view)
const art::Event * GetEvent() const
Definition: EventHolder.cxx:45
void Clear()
Definition: View2D.cxx:109
RawDataDrawer * RawDataDraw()
Definition: DrawingPad.cxx:91
void Draw()
Definition: View2D.cxx:89
static EventHolder * Instance()
Definition: EventHolder.cxx:15
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
int evt
void Config(int detid)
Definition: HardwarePad.cxx:57
evdb::View2D * fView
Collection of graphics objects to render.
Definition: HardwarePad.h:30
TH2F * fHisto
Histogram to draw object on.
Definition: HardwarePad.h:29
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:37
Helper for AttenCurve.
Definition: Path.h:10
GeometryDrawer * evd::DrawingPad::GeometryDraw ( )
inherited

Provide access to the drawer for the detector geometry

Definition at line 73 of file DrawingPad.cxx.

References evd::DrawingPad::fGeometryDraw.

Referenced by evd::Display3DPad::Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

74  {
75  if (fGeometryDraw==0) fGeometryDraw = new GeometryDrawer();
76  return fGeometryDraw;
77  }
GeometryDrawer * fGeometryDraw
Drawer for detector geometry.
Definition: DrawingPad.h:39
HeaderDrawer * evd::DrawingPad::HeaderDraw ( )
inherited

Provide access to the drawer for the event header

Definition at line 64 of file DrawingPad.cxx.

References evd::DrawingPad::fHeaderDraw.

Referenced by evd::HeaderPad::Draw(), evd::Display3DPad::Draw(), and evd::DrawingPad::Pad().

65  {
66  if (fHeaderDraw==0) fHeaderDraw = new HeaderDrawer();
67  return fHeaderDraw;
68  }
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:38
TPad* evd::DrawingPad::Pad ( )
inlineinherited
RawDataDrawer * evd::DrawingPad::RawDataDraw ( )
inherited

Provide access to the drawer for the RawData classes

Definition at line 91 of file DrawingPad.cxx.

References evd::DrawingPad::fRawDataDraw.

Referenced by evd::TZProjPad::AutoZoom(), evd::TQPad::Draw(), Draw(), evd::Display3DPad::Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

92  {
93  if (fRawDataDraw==0) fRawDataDraw = new RawDataDrawer();
94  return fRawDataDraw;
95  }
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:41
RecoBaseDrawer * evd::DrawingPad::RecoBaseDraw ( )
inherited

Provide access to the drawer for RecoBase classes

Definition at line 101 of file DrawingPad.cxx.

References evd::DrawingPad::fRecoBaseDraw.

Referenced by evd::TQPad::Draw(), evd::Display3DPad::Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

102  {
103  if (fRecoBaseDraw==0) fRecoBaseDraw = new RecoBaseDrawer();
104  return fRecoBaseDraw;
105  }
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:42
SimulationDrawer * evd::DrawingPad::SimulationDraw ( )
inherited

Provide access to the drawer for the Simulation classes

Definition at line 82 of file DrawingPad.cxx.

References evd::DrawingPad::fSimulationDraw.

Referenced by evd::TZProjPad::AutoZoomTruth(), evd::MCBriefPad::Draw(), evd::TQPad::Draw(), evd::Display3DPad::Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

83  {
84  if (fSimulationDraw==0) fSimulationDraw = new SimulationDrawer();
85  return fSimulationDraw;
86  }
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:40

Member Data Documentation

int evd::HardwarePad::fDetId
private

Which detector are we configured for?

Definition at line 28 of file HardwarePad.h.

Referenced by Config().

GeometryDrawer* evd::DrawingPad::fGeometryDraw
protectedinherited

Drawer for detector geometry.

Definition at line 39 of file DrawingPad.h.

Referenced by evd::DrawingPad::GeometryDraw(), and evd::DrawingPad::~DrawingPad().

HeaderDrawer* evd::DrawingPad::fHeaderDraw
protectedinherited

Drawer for event header info.

Definition at line 38 of file DrawingPad.h.

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

TH2F* evd::HardwarePad::fHisto
private

Histogram to draw object on.

Definition at line 29 of file HardwarePad.h.

Referenced by Config(), Draw(), and ~HardwarePad().

TPad* evd::DrawingPad::fPad
protectedinherited
RawDataDrawer* evd::DrawingPad::fRawDataDraw
protectedinherited

Drawer for raw data.

Definition at line 41 of file DrawingPad.h.

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

RecoBaseDrawer* evd::DrawingPad::fRecoBaseDraw
protectedinherited

Drawer for recobase objects.

Definition at line 42 of file DrawingPad.h.

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

SimulationDrawer* evd::DrawingPad::fSimulationDraw
protectedinherited

Drawer for simulation objects.

Definition at line 40 of file DrawingPad.h.

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

evdb::View2D* evd::HardwarePad::fView
private

Collection of graphics objects to render.

Definition at line 30 of file HardwarePad.h.

Referenced by Draw(), HardwarePad(), and ~HardwarePad().


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