LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evd::CalorView Class Reference

View showing calorimetric particle ID information. More...

#include "CalorView.h"

Inheritance diagram for evd::CalorView:
evdb::Canvas evdb::Printable

Public Member Functions

 CalorView (TGMainFrame *mf)
 
virtual ~CalorView ()
 
const char * Description () const
 
const char * PrintTag () const
 
void Draw (const char *opt="")
 
void CloseWindow ()
 
virtual void Print (const char *f)
 
void Connect ()
 Make signal/slot connections. More...
 

Static Public Member Functions

static void AddToListOfPrintables (const char *name, evdb::Printable *p)
 
static void RemoveFromListOfPrintables (evdb::Printable *p)
 
static std::map< std::string, evdb::Printable * > & GetPrintables ()
 

Protected Attributes

TGCompositeFrame * fFrame
 Graphics frame. More...
 
TGLayoutHints * fLayout
 Layout hints for frame. More...
 
TRootEmbeddedCanvas * fEmbCanvas
 Embedded canvas. More...
 
TCanvas * fCanvas
 The ROOT drawing canvas. More...
 
unsigned short fXsize
 Size of the canvas;. More...
 
unsigned short fYsize
 Size of the canvas;. More...
 
float fAspectRatio
 fYsize/fXsize More...
 

Private Attributes

CalorPadfDeDxPad
 Graphics pad for dEdx vs. Res. range. More...
 
CalorPadfKEPad
 Graphics pad for KE vs. Total range. More...
 

Detailed Description

View showing calorimetric particle ID information.

Definition at line 20 of file CalorView.h.

Constructor & Destructor Documentation

evd::CalorView::CalorView ( TGMainFrame *  mf)

Definition at line 16 of file CalorView.cxx.

References evdb::Canvas::Connect(), evdb::Canvas::fCanvas, fDeDxPad, evd::AnalysisDrawingOptions::fDrawShowerCalor, and fKEPad.

16  : 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 }
void Connect()
Make signal/slot connections.
Definition: Canvas.cxx:68
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
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
evd::CalorView::~CalorView ( )
virtual

Definition at line 38 of file CalorView.cxx.

39 {
40  //if(fDeDxPad){ delete fDeDxPad; fDeDxPad = 0;}
41  //if(fKEPad){ delete fKEPad; fKEPad = 0;}
42 }

Member Function Documentation

void evdb::Printable::AddToListOfPrintables ( const char *  name,
evdb::Printable p 
)
staticinherited

Definition at line 29 of file Printable.cxx.

Referenced by evdb::Canvas::Connect(), evdb::ObjListCanvas::Connect(), evdb::Printable::Description(), and evdb::testCanvas1::testCanvas1().

31  {
32  std::string s(name);
33 
34  if (gsPrintables[s] == 0) {
35  gsPrintables[s] = p;
36  }
37  else {
38  if (gsPrintables[s] != p) {
39  std::cerr << "Printable: Name " << name << " reused.\n";
40  std::abort();
41  }
42  }
43  }
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14
void evd::CalorView::CloseWindow ( )

Definition at line 45 of file CalorView.cxx.

Referenced by PrintTag().

46 {
47  delete this;
48 }
void evdb::Canvas::Connect ( )
inherited

Make signal/slot connections.

Definition at line 68 of file Canvas.cxx.

References evdb::Printable::AddToListOfPrintables(), and evdb::Canvas::Description().

Referenced by CalorView(), evdb::Canvas::Description(), evd::Display3DView::Display3DView(), and evdb::DisplayWindow::DisplayWindow().

69  {
70  // Make connections for drawing and printing
71  // IoModule::Instance()->Connect("NewEvent()",
72  // "evdb::Canvas",this,"Draw()");
74  }
virtual const char * Description() const
Definition: Canvas.h:33
static void AddToListOfPrintables(const char *name, evdb::Printable *p)
Definition: Printable.cxx:29
const char* evd::CalorView::Description ( ) const
inlinevirtual

Reimplemented from evdb::Canvas.

Definition at line 31 of file CalorView.h.

31 { return "Calorimetric PID Display"; }
void evd::CalorView::Draw ( const char *  opt = "")
virtual

Implements evdb::Canvas.

Definition at line 52 of file CalorView.cxx.

References evd::CalorPad::Draw(), evdb::Canvas::fCanvas, fDeDxPad, fKEPad, and evd::DrawingPad::Pad().

Referenced by PrintTag().

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 }
void Draw(const char *opt=0)
Definition: CalorPad.cxx:118
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
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
TPad * Pad()
Definition: DrawingPad.h:31
std::map< std::string, evdb::Printable * > & evdb::Printable::GetPrintables ( )
staticinherited

Definition at line 61 of file Printable.cxx.

References evdb::gsPrintables.

Referenced by evdb::Printable::Description(), evdb::EventDisplay::postProcessEvent(), and evdb::PrintDialog::PrintDialog().

62  {
63  return gsPrintables;
64  }
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14
void evdb::Canvas::Print ( const char *  f)
virtualinherited

Implements evdb::Printable.

Definition at line 88 of file Canvas.cxx.

References evdb::Canvas::fCanvas.

Referenced by evdb::Canvas::Description().

88 { fCanvas->Print(f); }
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
TFile f
Definition: plotHisto.C:6
const char* evd::CalorView::PrintTag ( ) const
inlinevirtual

Reimplemented from evdb::Canvas.

Definition at line 32 of file CalorView.h.

References CloseWindow(), and Draw().

32 { return "larcalor"; }
void evdb::Printable::RemoveFromListOfPrintables ( evdb::Printable p)
staticinherited

Definition at line 47 of file Printable.cxx.

Referenced by evdb::Printable::Description(), evdb::Printable::~Printable(), and evdb::testCanvas1::~testCanvas1().

48  {
51  for (; itr!=itrEnd; ++itr) {
52  if ( itr->second == p) {
53  gsPrintables.erase(itr);
54  return;
55  }
56  }
57  }
intermediate_table::iterator iterator
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14

Member Data Documentation

float evdb::Canvas::fAspectRatio
protectedinherited

fYsize/fXsize

Definition at line 46 of file Canvas.h.

Referenced by evdb::Canvas::Canvas().

CalorPad* evd::CalorView::fDeDxPad
private

Graphics pad for dEdx vs. Res. range.

Definition at line 37 of file CalorView.h.

Referenced by CalorView(), and Draw().

TRootEmbeddedCanvas* evdb::Canvas::fEmbCanvas
protectedinherited
TGCompositeFrame* evdb::Canvas::fFrame
protectedinherited
CalorPad* evd::CalorView::fKEPad
private

Graphics pad for KE vs. Total range.

Definition at line 38 of file CalorView.h.

Referenced by CalorView(), and Draw().

TGLayoutHints* evdb::Canvas::fLayout
protectedinherited
unsigned short evdb::Canvas::fXsize
protectedinherited
unsigned short evdb::Canvas::fYsize
protectedinherited

The documentation for this class was generated from the following files: