Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
evd::HardwareView Class Reference

View of event. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-02-24/EventDisplay/HardwareView.h"

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

Public Member Functions

 HardwareView (TGMainFrame *mf)
 
 ~HardwareView ()
 
const char * Description () const
 
const char * PrintTag () const
 
void Draw (const char *opt="")
 
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

HeaderPadfHeaderPad
 Show header information. More...
 
TQPadfRawQ
 Histogram of raw charges. More...
 
TQPadfRawT
 Histogram of raw times. More...
 
HardwarePadfHardwarePad
 Hits by hardware address. More...
 

Detailed Description

View of event.

Definition at line 18 of file HardwareView.h.

Constructor & Destructor Documentation

evd::HardwareView::HardwareView ( TGMainFrame *  mf)

Definition at line 17 of file HardwareView.cxx.

References evd::HeaderPad::Draw(), evd::TQPad::Draw(), evd::HardwarePad::Draw(), evdb::Canvas::fCanvas, fHardwarePad, fHeaderPad, fRawQ, fRawT, x1, submit_syst::x2, and submit_syst::y2.

17  : evdb::Canvas(mf)
18  {
19  // X and Y locations which determine the layout
20  double x0 = 0.0;
21  double x1 = 0.15;
22  double x3 = 1.0;
23  double x2 = 0.5*(x1+x3);
24 
25  double y0 = 0.0;
26  double y2 = 0.15;
27  double y4 = 1.0;
28 
30  fHeaderPad = new HeaderPad("fHeaderPad","Header",x0,y0,x1,y2,"");
31  fHeaderPad->Draw();
32 
34  fRawT = new TQPad("fTPad", "Hit Times",x1,y0,x2,y2,"T");
35  fRawT->Draw();
36 
38  fRawQ = new TQPad("fQPad", "Hit Charges",x2,y0,x3,y2,"Q");
39  fRawQ->Draw();
40 
42  fHardwarePad = new HardwarePad("fHardwarePad","Hardware Pad",
43  x0, y2, x3, y4, 0);
44  fHardwarePad->Draw();
45 
46  evdb::Canvas::fCanvas->Update();
47  }
Float_t x1[n_points_granero]
Definition: compare.C:5
HeaderPad * fHeaderPad
Show header information.
Definition: HardwareView.h:30
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
TQPad * fRawT
Histogram of raw times.
Definition: HardwareView.h:32
void Draw()
Definition: TQPad.cxx:123
HardwarePad * fHardwarePad
Hits by hardware address.
Definition: HardwareView.h:35
void Draw(const char *opt="")
Definition: HeaderPad.cxx:40
TQPad * fRawQ
Histogram of raw charges.
Definition: HardwareView.h:31
void Draw(const char *opt=0)
Definition: HardwarePad.cxx:85
evd::HardwareView::~HardwareView ( )

Definition at line 51 of file HardwareView.cxx.

References fRawQ, and fRawT.

52  {
53  if (fRawT) { delete fRawT; fRawT = 0; }
54  if (fRawQ) { delete fRawQ; fRawQ = 0; }
55  }
TQPad * fRawT
Histogram of raw times.
Definition: HardwareView.h:32
TQPad * fRawQ
Histogram of raw charges.
Definition: HardwareView.h:31

Member Function Documentation

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

Definition at line 29 of file Printable.cxx.

References om::cerr, and string.

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

31  {
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  }
const XML_Char * name
Definition: expat.h:151
static std::map< std::string, evdb::Printable * > gsPrintables
Definition: Printable.cxx:14
const char * p
Definition: xmltok.h:285
OStream cerr
Definition: OStream.cxx:7
const XML_Char * s
Definition: expat.h:262
enum BeamMode string
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 evdb::Canvas::Description(), 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::HardwareView::Description ( ) const
inlinevirtual

Reimplemented from evdb::Canvas.

Definition at line 25 of file HardwareView.h.

25 { return "Hardware View"; }
void evd::HardwareView::Draw ( const char *  opt = "")
virtual

Implements evdb::Canvas.

Definition at line 59 of file HardwareView.cxx.

References evd::HeaderPad::Draw(), evd::TQPad::Draw(), evd::HardwarePad::Draw(), evdb::Canvas::fCanvas, fHardwarePad, fHeaderPad, fRawQ, and fRawT.

Referenced by PrintTag().

60  {
62 
63  fHeaderPad->Draw();
64 
65  fRawT->Draw();
66  fRawQ->Draw();
67 
68  fHardwarePad->Draw();
69 
70  evdb::Canvas::fCanvas->Update();
71  }
HeaderPad * fHeaderPad
Show header information.
Definition: HardwareView.h:30
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
TQPad * fRawT
Histogram of raw times.
Definition: HardwareView.h:32
void Draw()
Definition: TQPad.cxx:123
HardwarePad * fHardwarePad
Hits by hardware address.
Definition: HardwareView.h:35
void Draw(const char *opt="")
Definition: HeaderPad.cxx:40
TQPad * fRawQ
Histogram of raw charges.
Definition: HardwareView.h:31
void Draw(const char *opt=0)
Definition: HardwarePad.cxx:85
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(), evd::SliceNavigator::postProcessEvent(), 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
const char* evd::HardwareView::PrintTag ( ) const
inlinevirtual

Reimplemented from evdb::Canvas.

Definition at line 26 of file HardwareView.h.

References Draw(), and MECModelEnuComparisons::opt.

26 { return "hardware"; }
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  {
49  std::map<std::string,Printable*>::iterator itr(gsPrintables.begin());
50  std::map<std::string,Printable*>::iterator itrEnd(gsPrintables.end());
51  for (; itr!=itrEnd; ++itr) {
52  if ( itr->second == p) {
53  gsPrintables.erase(itr);
54  return;
55  }
56  }
57  }
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().

TCanvas* evdb::Canvas::fCanvas
protectedinherited
TRootEmbeddedCanvas* evdb::Canvas::fEmbCanvas
protectedinherited

Embedded canvas.

Definition at line 41 of file Canvas.h.

Referenced by evdb::Canvas::Canvas(), evd::XZYZProjectionsView::XZYZProjectionsView(), and evdb::Canvas::~Canvas().

TGCompositeFrame* evdb::Canvas::fFrame
protectedinherited

Graphics frame.

Definition at line 39 of file Canvas.h.

Referenced by evdb::Canvas::Canvas(), and evdb::Canvas::~Canvas().

HardwarePad* evd::HardwareView::fHardwarePad
private

Hits by hardware address.

Definition at line 35 of file HardwareView.h.

Referenced by Draw(), and HardwareView().

HeaderPad* evd::HardwareView::fHeaderPad
private

Show header information.

Definition at line 30 of file HardwareView.h.

Referenced by Draw(), and HardwareView().

TGLayoutHints* evdb::Canvas::fLayout
protectedinherited

Layout hints for frame.

Definition at line 40 of file Canvas.h.

Referenced by evdb::Canvas::Canvas(), evd::XZYZProjectionsView::XZYZProjectionsView(), and evdb::Canvas::~Canvas().

TQPad* evd::HardwareView::fRawQ
private

Histogram of raw charges.

Definition at line 31 of file HardwareView.h.

Referenced by Draw(), HardwareView(), and ~HardwareView().

TQPad* evd::HardwareView::fRawT
private

Histogram of raw times.

Definition at line 32 of file HardwareView.h.

Referenced by Draw(), HardwareView(), and ~HardwareView().

unsigned short evdb::Canvas::fXsize
protectedinherited

Size of the canvas;.

Definition at line 44 of file Canvas.h.

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

unsigned short evdb::Canvas::fYsize
protectedinherited

Size of the canvas;.

Definition at line 45 of file Canvas.h.

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


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