LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CalorView.cxx
Go to the documentation of this file.
1 //
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 evd::CalorView::CalorView(TGMainFrame* mf) : evdb::Canvas(mf)
23 {
24 
26 
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  }
35  fKEPad = new CalorPad("fKEPad","Kinetic Energy Pad",0.0,0.0,1.0,0.5,0);
36 
37  this->Connect("CloseWindow()","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 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 
void Connect()
Make signal/slot connections.
Definition: Canvas.cxx:68
void Draw(const char *opt=0)
Definition: CalorPad.cxx:104
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:39
CalorPad * fKEPad
Graphics pad for KE vs. Total range.
Definition: CalorView.h:40
void Draw(const char *opt="")
Definition: CalorView.cxx:58
void CloseWindow()
Definition: CalorView.cxx:51
Drawing pad showing calorimetric particle ID information.
A drawing pad showing calorimetric particle ID information.
Definition: CalorPad.h:20
TPad * Pad()
Definition: DrawingPad.h:37
A view showing calorimetric particle ID information.
virtual ~CalorView()
Definition: CalorView.cxx:44
CalorView(TGMainFrame *mf)
Definition: CalorView.cxx:22