CalorView.cxx
Go to the documentation of this file.
1 //
2 /// \file CalorView.cxx
3 /// \brief Calorimetric view display window
4 /// \author msoderbe@syr.edu
5 ///
6 #include "TCanvas.h"
10 
12 
13 //......................................................................
14 // Constructor.
15 
16 evd::CalorView::CalorView(TGMainFrame* mf) : evdb::Canvas(mf)
17 {
18 
20 
21  evdb::Canvas::fCanvas->cd();
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  }
28  evdb::Canvas::fCanvas->cd();
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 
65 ////////////////////////////////////////////////////////////////////////
void Draw(const char *opt=0)
Definition: CalorPad.cxx:94
CalorPad * fDeDxPad
Graphics pad for dEdx vs. Res. range.
Definition: CalorView.h:39
CalorPad * fKEPad
Graphics pad for KE vs. Total range.
Definition: CalorView.h:40
void Draw(const char *opt="")
Definition: CalorView.cxx:52
void CloseWindow()
Definition: CalorView.cxx:45
A drawing pad showing calorimetric particle ID information.
Definition: CalorPad.h:21
TPad * Pad()
Definition: DrawingPad.h:37
virtual ~CalorView()
Definition: CalorView.cxx:38
CalorView(TGMainFrame *mf)
Definition: CalorView.cxx:16