Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

evd::DrawingPad Class Reference

Base class for event display drawing pads. More...

#include <DrawingPad.h>

Inheritance diagram for evd::DrawingPad:

evd::MCBriefPad evd::TQPad evd::TZProjPad List of all members.

Public Member Functions

 DrawingPad (const char *nm, const char *ti, double x1, double y1, double y2, double x2)
 ~DrawingPad ()
TPad * Pad ()
const edm::EventHandleEventHandle () const
const geo::GeometryGeometry () const
SimulationDrawerSimulationDraw ()
RawDataDrawerRawDataDraw ()
RecoBaseDrawerRecoBaseDraw ()

Protected Attributes

TPad * fPad
 The ROOT graphics pad.
SimulationDrawerfSimulationDraw
 Drawer for simulation objects.
RawDataDrawerfRawDataDraw
 Drawer for raw data.
RecoBaseDrawerfRecoBaseDraw
 Drawer for recobase objects.

Detailed Description

Base class for event display drawing pads.

Definition at line 19 of file DrawingPad.h.


Constructor & Destructor Documentation

DrawingPad::DrawingPad const char *  nm,
const char *  ti,
double  x1,
double  y1,
double  x2,
double  y2
 

Create a drawing pad for the event display

Parameters:
nm : Name of the TPad
ti : Title of the TPad
x1 : Relative x position (0-1) of lower left corner
y1 : Relative y position (0-1) of lower left corner
x2 : Relative x position (0-1) of upper right corner
y2 : Relative y position (0-1) of upper right corner

Definition at line 30 of file DrawingPad.cxx.

References fPad.

00033                                              :
00034   fSimulationDraw(0),
00035   fRawDataDraw(0),
00036   fRecoBaseDraw(0)
00037 {
00038   std::cout << "Creating pad " << nm << std::endl;
00039   fPad = new TPad(nm,ti,x1,y1,x2,y2);
00040   fPad->Draw();
00041   fPad->cd();
00042 }

DrawingPad::~DrawingPad  ) 
 

Definition at line 46 of file DrawingPad.cxx.

References fPad, fRawDataDraw, fRecoBaseDraw, and fSimulationDraw.

00047 {
00048   if (fSimulationDraw) { delete fSimulationDraw; fSimulationDraw = 0; }
00049   if (fRawDataDraw)    { delete fRawDataDraw;    fRawDataDraw    = 0; }
00050   if (fRecoBaseDraw)   { delete fRecoBaseDraw;   fRecoBaseDraw   = 0; }
00051   if (fPad)            { delete fPad;            fPad = 0;            }
00052 }


Member Function Documentation

const edm::EventHandle & DrawingPad::EventHandle  )  const
 

Definition at line 56 of file DrawingPad.cxx.

References evdb::IoModule::Instance().

Referenced by evd::TZProjPad::Draw(), and Geometry().

00057 {
00058   return evdb::IoModule::Instance()->GetEvent();
00059 }

const geo::Geometry & DrawingPad::Geometry  )  const
 

Definition at line 63 of file DrawingPad.cxx.

References EventHandle(), and util::EDMUtils::GetGeometry().

Referenced by evd::TZProjPad::Draw(), and evd::TZProjPad::TZProjPad().

00064 {
00065   const edm::EventHandle& evt = this->EventHandle();
00066 
00067   return util::EDMUtils::GetGeometry(evt);
00068 }

TPad* evd::DrawingPad::Pad  )  [inline]
 

Definition at line 26 of file DrawingPad.h.

Referenced by evd::MCBriefPad::Draw(), evd::MCBriefPad::MCBriefPad(), evd::TQPad::TQPad(), and evd::TZProjPad::TZProjPad().

00026 { return fPad; }

RawDataDrawer * DrawingPad::RawDataDraw  ) 
 

Provide access to the drawer for the RawData classes

Definition at line 84 of file DrawingPad.cxx.

References fRawDataDraw.

Referenced by evd::TZProjPad::AutoZoom(), evd::TZProjPad::Draw(), and evd::TQPad::Draw().

00085 {
00086   if (fRawDataDraw==0) fRawDataDraw = new RawDataDrawer();
00087   return fRawDataDraw;
00088 }

RecoBaseDrawer * DrawingPad::RecoBaseDraw  ) 
 

Provide access to the drawer for RecoBase classes

Definition at line 95 of file DrawingPad.cxx.

References fRecoBaseDraw.

Referenced by evd::TZProjPad::Draw().

00096 {
00097   if (fRecoBaseDraw==0) fRecoBaseDraw = new RecoBaseDrawer();
00098   return fRecoBaseDraw;
00099 }

SimulationDrawer * DrawingPad::SimulationDraw  ) 
 

Provide access to the drawer for the Simulation classes

Definition at line 75 of file DrawingPad.cxx.

References fSimulationDraw.

Referenced by evd::TZProjPad::Draw(), and evd::MCBriefPad::Draw().

00076 {
00077   if (fSimulationDraw==0) fSimulationDraw = new SimulationDrawer();
00078   return fSimulationDraw;
00079 }


Member Data Documentation

TPad* evd::DrawingPad::fPad [protected]
 

The ROOT graphics pad.

Definition at line 39 of file DrawingPad.h.

Referenced by DrawingPad(), and ~DrawingPad().

RawDataDrawer* evd::DrawingPad::fRawDataDraw [protected]
 

Drawer for raw data.

Definition at line 41 of file DrawingPad.h.

Referenced by RawDataDraw(), and ~DrawingPad().

RecoBaseDrawer* evd::DrawingPad::fRecoBaseDraw [protected]
 

Drawer for recobase objects.

Definition at line 42 of file DrawingPad.h.

Referenced by RecoBaseDraw(), and ~DrawingPad().

SimulationDrawer* evd::DrawingPad::fSimulationDraw [protected]
 

Drawer for simulation objects.

Definition at line 40 of file DrawingPad.h.

Referenced by SimulationDraw(), and ~DrawingPad().


The documentation for this class was generated from the following files:
Generated on Sun Nov 22 04:45:31 2009 for NOvA Offline by  doxygen 1.3.9.1