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 <iostream>
7 #include <sstream>
8 #include <cmath>
9 
10 #include "TCanvas.h"
11 #include "TVirtualX.h"
12 #include "TRootEmbeddedCanvas.h"
16 
18 
19 //......................................................................
20 // Constructor.
21 
22 gar::evd::CalorView::CalorView(TGMainFrame* mf) : evdb::Canvas(mf)
23 {
24 
26 
27  evdb::Canvas::fCanvas->cd();
28  if (anaOpt->fDrawShowerCalor){
29  fDeDxPad = new CalorPad("fDeDxPad","DeDx Pad",0.0,0.5,1.0,1.0,2);
30  }
31  else{
32  fDeDxPad = new CalorPad("fDeDxPad","DeDx Pad",0.0,0.5,1.0,1.0,1);
33  }
34  evdb::Canvas::fCanvas->cd();
35  fKEPad = new CalorPad("fKEPad","Kinetic Energy Pad",0.0,0.0,1.0,0.5,0);
36 
37  this->Connect("CloseWindow()","gar::evd::CalorView",this,"CloseWindow()");
38 
39  evdb::Canvas::fCanvas->Update();
40 }
41 
42 //......................................................................
43 // Destructor.
45 {
46  //if(fDeDxPad){ delete fDeDxPad; fDeDxPad = 0;}
47  //if(fKEPad){ delete fKEPad; fKEPad = 0;}
48 }
49 
50 //......................................................................
52 {
53  delete this;
54 }
55 
56 //......................................................................
57 // Draw object in graphics pads.
58 void gar::evd::CalorView::Draw(const char* /*opt*/)
59 {
60 
61  //evdb::Canvas::fCanvas->ls();
62  fDeDxPad->Pad()->cd();
63  fDeDxPad->Draw();
64 
65  fKEPad->Pad()->cd();
66  fKEPad->Draw();
67 
68  evdb::Canvas::fCanvas->Update();
69 }
70 
71 ////////////////////////////////////////////////////////////////////////
A drawing pad showing calorimetric particle ID information.
Definition: CalorPad.h:21
CalorPad * fDeDxPad
Graphics pad for dEdx vs. Res. range.
Definition: CalorView.h:40
CalorPad * fKEPad
Graphics pad for KE vs. Total range.
Definition: CalorView.h:41
virtual ~CalorView()
Definition: CalorView.cxx:44
CalorView(TGMainFrame *mf)
Definition: CalorView.cxx:22
void Draw(const char *opt=0)
Definition: CalorPad.cxx:103
void Draw(const char *opt="")
Definition: CalorView.cxx:58