LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CalorView.cxx
Go to the documentation of this file.
1 //
7 #include "TCanvas.h"
10 
12 
13 //......................................................................
14 // Constructor.
15 
16 evd::CalorView::CalorView(TGMainFrame* mf) : evdb::Canvas(mf)
17 {
18 
20 
22  if (anaOpt->fDrawShowerCalor) {
23  fDeDxPad = new CalorPad("fDeDxPad", "DeDx Pad", 0.0, 0.5, 1.0, 1.0, 2);
24  }
25  else {
26  fDeDxPad = new CalorPad("fDeDxPad", "DeDx Pad", 0.0, 0.5, 1.0, 1.0, 1);
27  }
29  fKEPad = new CalorPad("fKEPad", "Kinetic Energy Pad", 0.0, 0.0, 1.0, 0.5, 0);
30 
31  this->Connect("CloseWindow()", "evd::CalorView", this, "CloseWindow()");
32 
33  evdb::Canvas::fCanvas->Update();
34 }
35 
36 //......................................................................
37 // Destructor.
39 {
40  //if(fDeDxPad){ delete fDeDxPad; fDeDxPad = 0;}
41  //if(fKEPad){ delete fKEPad; fKEPad = 0;}
42 }
43 
44 //......................................................................
46 {
47  delete this;
48 }
49 
50 //......................................................................
51 // Draw object in graphics pads.
52 void evd::CalorView::Draw(const char* /*opt*/)
53 {
54 
55  //evdb::Canvas::fCanvas->ls();
56  fDeDxPad->Pad()->cd();
57  fDeDxPad->Draw();
58 
59  fKEPad->Pad()->cd();
60  fKEPad->Draw();
61 
62  evdb::Canvas::fCanvas->Update();
63 }
64 
void Connect()
Make signal/slot connections.
Definition: Canvas.cxx:68
void Draw(const char *opt=0)
Definition: CalorPad.cxx:118
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
Manage all things related to colors for the event display.
CalorPad * fDeDxPad
Graphics pad for dEdx vs. Res. range.
Definition: CalorView.h:37
CalorPad * fKEPad
Graphics pad for KE vs. Total range.
Definition: CalorView.h:38
void Draw(const char *opt="")
Definition: CalorView.cxx:52
void CloseWindow()
Definition: CalorView.cxx:45
Drawing pad showing calorimetric particle ID information.
A drawing pad showing calorimetric particle ID information.
Definition: CalorPad.h:23
TPad * Pad()
Definition: DrawingPad.h:31
A view showing calorimetric particle ID information.
virtual ~CalorView()
Definition: CalorView.cxx:38
CalorView(TGMainFrame *mf)
Definition: CalorView.cxx:16