All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCBriefPad.cxx
Go to the documentation of this file.
1 ///
2 /// \file MCBriefPad.cxx
3 /// \brief Drawing pad for time or charge histograms
4 /// \author messier@indiana.edu
5 ///
6 #include "TPad.h"
7 
8 #include "art/Framework/Principal/fwd.h"
9 
11 #include "nuevdb/EventDisplayBase/View2D.h"
12 #include "nuevdb/EventDisplayBase/EventHolder.h"
14 
15 namespace evd{
16 
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  DrawingPad(nm, ti, x1, y1, x2, y2)
24  {
25  this->Pad()->cd();
26 
27  fView = new evdb::View2D();
28  }
29 
30  //......................................................................
31 
33  {
34  if (fView) { delete fView; fView = 0; }
35  }
36 
37  //......................................................................
38 
40  {
41  fView->Clear();
42  this->Pad()->Clear();
43 
44  const art::Event *evt = evdb::EventHolder::Instance()->GetEvent();
45  if(evt){
46  this->SimulationDraw()->MCTruthShortText(*evt, fView);
47  this->SimulationDraw()->MCTruthLongText (*evt, fView);
48  }
49  fPad->cd();
50  fView->Draw();
51  }
52 }//namespace
53 //////////////////////////////////////////////////////////////////////////
void MCTruthLongText(const art::Event &evt, evdb::View2D *view)
Drawing pad for short summary of an MC event.
evdb::View2D * fView
Superimpose scale on 1D histo.
Definition: MCBriefPad.h:22
MCBriefPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
Definition: MCBriefPad.cxx:19
Base class for event display drawing pads.
Definition: DrawingPad.h:29
TPad * Pad()
Definition: DrawingPad.h:37
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:96
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:52
TCEvent evt
Definition: DataStructs.cxx:8