HeaderPad.cxx
Go to the documentation of this file.
1 ///
2 /// \file HeaderPad.cxx
3 /// \brief Drawing pad for time or charge histograms
4 /// \author messier@indiana.edu
5 /// \version $Id: HeaderPad.cxx,v 1.2 2010/11/11 18:11:22 p-novaart Exp $
6 ///
8 #include "nuevdb/EventDisplayBase/View2D.h"
10 
11 #include "TPad.h"
12 #include "TText.h"
13 
14 namespace gar {
15 namespace evd{
16 
17  // clang didn't like these unused varaibles
18 
19  //static const int kRAW = 0;
20  //static const int kCALIB = 1;
21  //static const int kPE = 2;
22  //static const int kTNS = 3;
23 
24  //......................................................................
25 
26  HeaderPad::HeaderPad(const char* nm, const char* ti,
27  double x1, double y1,
28  double x2, double y2,
29  const char* /*opt*/) :
30  DrawingPad(nm, ti, x1, y1, x2, y2)
31  {
32  fView = new evdb::View2D();
33  }
34 
35  //......................................................................
36 
38  {
39  if (fView != nullptr) { delete fView; fView = nullptr; }
40  }
41 
42  //......................................................................
43 
44  void HeaderPad::Draw(const char* /* opt */)
45  {
46  fView->Clear();
47 
48  this->HeaderDraw()->Header(fView);
49 
50  this->Pad()->Clear();
51  this->Pad()->cd();
52  fView->Draw();
53  }
54 
55  //......................................................................
56 
57 }
58 }// namespace
59 //////////////////////////////////////////////////////////////////////////
HeaderDrawer * HeaderDraw()
Definition: DrawingPad.cxx:76
void Draw(const char *opt="")
Definition: HeaderPad.cxx:44
LArSoft includes.
Definition: InfoTransfer.h:33
HeaderPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
Definition: HeaderPad.cxx:26
Base class for event display drawing pads.
Definition: DrawingPad.h:23
General GArSoft Utilities.
void Header(evdb::View2D *view)
evdb::View2D * fView
Collection of drawn objects.
Definition: HeaderPad.h:28