HardwareView.cxx
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////////
2 /// \file HardwareView.cxx
3 /// \brief View the data by hardware addresses
4 /// \version $Id: HardwareView.cxx,v 1.2 2011-10-21 20:37:50 gsdavies Exp $
5 /// \author messier@indiana.edu
6 /////////////////////////////////////////////////////////////////////////////
7 #include "TCanvas.h"
8 
11 #include "EventDisplay/HeaderPad.h"
12 #include "EventDisplay/TQPad.h"
13 
14 namespace evd
15 {
16  //................................................................
18  {
19  // X and Y locations which determine the layout
20  double x0 = 0.0;
21  double x1 = 0.15;
22  double x3 = 1.0;
23  double x2 = 0.5*(x1+x3);
24 
25  double y0 = 0.0;
26  double y2 = 0.15;
27  double y4 = 1.0;
28 
30  fHeaderPad = new HeaderPad("fHeaderPad","Header",x0,y0,x1,y2,"");
31  fHeaderPad->Draw();
32 
34  fRawT = new TQPad("fTPad", "Hit Times",x1,y0,x2,y2,"T");
35  fRawT->Draw();
36 
38  fRawQ = new TQPad("fQPad", "Hit Charges",x2,y0,x3,y2,"Q");
39  fRawQ->Draw();
40 
42  fHardwarePad = new HardwarePad("fHardwarePad","Hardware Pad",
43  x0, y2, x3, y4, 0);
44  fHardwarePad->Draw();
45 
46  evdb::Canvas::fCanvas->Update();
47  }
48 
49  //......................................................................
50 
52  {
53  if (fRawT) { delete fRawT; fRawT = 0; }
54  if (fRawQ) { delete fRawQ; fRawQ = 0; }
55  }
56 
57  //......................................................................
58 
59  void HardwareView::Draw(const char* opt)
60  {
62 
63  fHeaderPad->Draw();
64 
65  fRawT->Draw();
66  fRawQ->Draw();
67 
68  fHardwarePad->Draw();
69 
70  evdb::Canvas::fCanvas->Update();
71  }
72 
73 } // end namespace evd
74 ////////////////////////////////////////////////////////////////////////
A view showing hits by hardware address.
Definition: Canvas.py:1
Float_t x1[n_points_granero]
Definition: compare.C:5
HardwareView(TGMainFrame *mf)
Drawing pad for time or charge histograms.
HeaderPad * fHeaderPad
Show header information.
Definition: HardwareView.h:30
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
TQPad * fRawT
Histogram of raw times.
Definition: HardwareView.h:32
void Draw()
Definition: TQPad.cxx:123
Manage all things related to colors for the event display.
Definition: Display3DPad.h:11
Drawing pad for time or charge histograms.
HardwarePad * fHardwarePad
Hits by hardware address.
Definition: HardwareView.h:35
nova event display
A drawing pad for an XZ or ZY.
Definition: HardwarePad.h:18
Drawing pad showing hits by hardware address.
void Draw(const char *opt="")
Definition: HeaderPad.cxx:40
void Draw(const char *opt="")
TQPad * fRawQ
Histogram of raw charges.
Definition: HardwareView.h:31
void Draw(const char *opt=0)
Definition: HardwarePad.cxx:85