MCBriefPad.cxx
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////
2 /// \file MCBrief.cxx
3 /// \brief Drawing pad for time or charge histograms
4 /// \author messier@indiana.edu
5 /// \version $Id: MCBriefPad.cxx,v 1.6 2011-12-17 04:44:32 messier Exp $
6 ////////////////////////////////////////////////////////////////////////
7 #include "TBox.h"
8 #include "TH1F.h"
9 #include "TPad.h"
10 
15 
16 namespace evd
17 {
18  //......................................................................
19  MCBriefPad::MCBriefPad(const char* nm, const char* ti,
20  double x1, double y1,
21  double x2, double y2,
22  const char* /*opt*/) :
23  // Hack to make MCtext region large enough. If one got pad geometry
24  // one could be a good citizen and fix this.
25  DrawingPad(nm, ti, x1, y1*0.95, x2, y2*2)
26  {
27  this->Pad()->cd();
28 
29  fView = new evdb::View2D();
30  }
31 
32  //......................................................................
33 
35  {
36  if (fView) { delete fView; fView = 0; }
37  }
38 
39  //......................................................................
40 
42  {
43  fView->Clear();
44 
46  if(evt){
47  this->SimulationDraw()->MCTruthShortText(*evt, fView);
48  this->SimulationDraw()->MCTruthLongText(*evt, fView);
49  }
50 
51  fPad->cd();
52  this->Pad()->Clear();
53  fView->Draw();
54  }
55 } // end namespace evd
56 //////////////////////////////////////////////////////////////////////////
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:23
static constexpr Double_t nm
Definition: Munits.h:133
A collection of drawable 2-D objects.
void Clear()
Definition: View2D.cxx:109
Singleton to hold the current art::Event for the event display.
nova event display
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
int evt
Base class for event display drawing pads.
Definition: DrawingPad.h:20
TPad * Pad()
Definition: DrawingPad.h:27
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:82
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:37