All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
11 #include "art/Framework/Services/Registry/ServiceHandle.h"
12 
13 //......................................................................
14 // Constructor.
15 
16 evd::CalorView::CalorView(TGMainFrame* mf) : evdb::Canvas(mf)
17 {
18 
19  art::ServiceHandle<evd::AnalysisDrawingOptions const> anaOpt;
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 ////////////////////////////////////////////////////////////////////////
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
Drawing pad showing calorimetric particle ID information.
A drawing pad showing calorimetric particle ID information.
Definition: CalorPad.h:21
A view showing calorimetric particle ID information.
virtual ~CalorView()
Definition: CalorView.cxx:38
CalorView(TGMainFrame *mf)
Definition: CalorView.cxx:16