LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MCBriefPad.cxx
Go to the documentation of this file.
1 #include "TPad.h"
7 
9 
14 
15 namespace evd {
16 
17  //......................................................................
18 
19  MCBriefPad::MCBriefPad(const char* nm,
20  const char* ti,
21  double x1,
22  double y1,
23  double x2,
24  double y2,
25  const char* /*opt*/)
26  : DrawingPad(nm, ti, x1, y1, x2, y2)
27  {
28  this->Pad()->cd();
29 
30  fView = new evdb::View2D();
31  }
32 
33  //......................................................................
34 
36  {
37  if (fView) {
38  delete fView;
39  fView = 0;
40  }
41  }
42 
43  //......................................................................
44 
46  {
47  fView->Clear();
48  this->Pad()->Clear();
49 
51  if (evt) {
52  this->SimulationDraw()->MCTruthShortText(*evt, fView);
53  this->SimulationDraw()->MCTruthLongText(*evt, fView);
54  }
55  fPad->cd();
56  fView->Draw();
57  }
58 } //namespace
const art::Event * GetEvent() const
Definition: EventHolder.cxx:45
void MCTruthLongText(const art::Event &evt, evdb::View2D *view)
Float_t y1[n_points_granero]
Definition: compare.C:5
Drawing pad for short summary of an MC event.
Float_t x1[n_points_granero]
Definition: compare.C:5
evdb::View2D * fView
Superimpose scale on 1D histo.
Definition: MCBriefPad.h:28
A collection of drawable 2-D objects.
void Clear()
Definition: View2D.cxx:109
Singleton to hold the current art::Event for the event display.
Float_t y2[n_points_geant4]
Definition: compare.C:26
LArSoft includes.
MCBriefPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
Definition: MCBriefPad.cxx:19
void Draw()
Definition: View2D.cxx:89
static EventHolder * Instance()
Definition: EventHolder.cxx:15
Base class for event display drawing pads.
Definition: DrawingPad.h:27
TPad * Pad()
Definition: DrawingPad.h:31
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:112
void MCTruthShortText(const art::Event &evt, evdb::View2D *view)
Render the objects from the Simulation package.
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:45
TCEvent evt
Definition: DataStructs.cxx:8
Float_t x2[n_points_geant4]
Definition: compare.C:26