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 /// \version $Id: MCBriefPad.cxx,v 1.2 2010/11/10 22:49:25 p-novaart Exp $
6 ///
7 #include "TBox.h"
8 #include "TH1F.h"
9 #include "TPad.h"
10 
12 #include "nuevdb/EventDisplayBase/View2D.h"
13 #include "nuevdb/EventDisplayBase/EventHolder.h"
15 
16 namespace gar {
17 namespace evd{
18 
19  //......................................................................
20 
21  MCBriefPad::MCBriefPad(const char* nm, const char* ti,
22  double x1, double y1,
23  double x2, double y2,
24  const char* /*opt*/) :
25  DrawingPad(nm, ti, x1, y1, x2, y2)
26  {
27  this->Pad()->cd();
28 
29  fView = new evdb::View2D();
30  }
31 
32  //......................................................................
33 
35  {
36  if (fView) { delete fView; fView = nullptr; }
37  }
38 
39  //......................................................................
40 
42  {
43  fView->Clear();
44  this->Pad()->Clear();
45 
46  const art::Event *evt = evdb::EventHolder::Instance()->GetEvent();
47  if(evt){
48  this->SimulationDraw()->MCTruthShortText(*evt, fView);
49  this->SimulationDraw()->MCTruthLongText (*evt, fView);
50  }
51  fPad->cd();
52  fView->Draw();
53  }
54 }
55 }//namespace
56 //////////////////////////////////////////////////////////////////////////
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:94
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:42
evdb::View2D * fView
Superimpose scale on 1D histo.
Definition: MCBriefPad.h:24
void MCTruthLongText(const art::Event &evt, evdb::View2D *view)
void MCTruthShortText(const art::Event &evt, evdb::View2D *view)
LArSoft includes.
Definition: InfoTransfer.h:33
Base class for event display drawing pads.
Definition: DrawingPad.h:23
General GArSoft Utilities.
MCBriefPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
Definition: MCBriefPad.cxx:21
TCEvent evt
Definition: DataStructs.cxx:7