CMS 3D CMS Logo

Public Member Functions | Private Attributes

GPFRecHit Class Reference

#include <GPFRecHit.h>

Inheritance diagram for GPFRecHit:
GPFBase

List of all members.

Public Member Functions

virtual void draw ()
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
double getEnergy ()
std::string getOption ()
 GPFRecHit (DisplayManager *dm, int view, int ident, reco::PFRecHit *hit, int size, double *x, double *y, int color, std::string option)
virtual void Print ()
void setColor (int newcolor)
void setColor ()
void setInitialColor ()
void setNewSize ()
void setNewStyle ()
virtual ~GPFRecHit ()

Private Attributes

double en_
 energy
std::string option_
 root draw option
reco::PFRecHitrecHit_

Detailed Description

Definition at line 14 of file GPFRecHit.h.


Constructor & Destructor Documentation

GPFRecHit::GPFRecHit ( DisplayManager dm,
int  view,
int  ident,
reco::PFRecHit hit,
int  size,
double *  x,
double *  y,
int  color,
std::string  option 
)

Definition at line 11 of file GPFRecHit.cc.

References GPFBase::color_, en_, reco::PFRecHit::energy(), and recHit_.

  : GPFBase(display,view,ident, color),
    TGraph(size,x,y),
    recHit_(rechit), option_(option)
{
  ResetBit(kCanDelete);
  
  en_=recHit_->energy();  
    
  SetLineColor(color_);
  SetFillColor(color_);
  
}                    
virtual GPFRecHit::~GPFRecHit ( ) [inline, virtual]

Definition at line 19 of file GPFRecHit.h.

{}

Member Function Documentation

void GPFRecHit::draw ( ) [virtual]

Reimplemented from GPFBase.

Definition at line 47 of file GPFRecHit.cc.

References option_.

{
  TGraph::Draw(option_.data());
}
void GPFRecHit::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Definition at line 32 of file GPFRecHit.cc.

References GPFBase::display_, DisplayManager::findAndDraw(), GPFBase::origId_, and Print().

{
  // Execute action corresponding to a mouse click 
  //on a GPFRecHit object in the window

  gPad->SetCursor(kHand);
  switch (event) {
  case kButton1Down:
    Print();
    display_->findAndDraw(origId_);
    break;
  default:break;
  }    
}
double GPFRecHit::getEnergy ( ) [inline, virtual]

Reimplemented from GPFBase.

Definition at line 22 of file GPFRecHit.h.

References en_.

{ return en_;}
std::string GPFRecHit::getOption ( ) [inline]

Definition at line 23 of file GPFRecHit.h.

References option_.

{ return option_;}
void GPFRecHit::Print ( void  ) [virtual]

Definition at line 27 of file GPFRecHit.cc.

References gather_cfg::cout, and recHit_.

Referenced by ExecuteEvent().

{
  std::cout<<*recHit_<<std::endl;
}
void GPFRecHit::setColor ( ) [virtual]

Implements GPFBase.

Definition at line 64 of file GPFRecHit.cc.

References GPFBase::color_, and option_.

{
  if (option_=="f") SetFillColor(color_);
  else              SetLineColor(color_);
}
void GPFRecHit::setColor ( int  newcolor) [virtual]

Implements GPFBase.

Definition at line 52 of file GPFRecHit.cc.

References option_.

{
  if (option_=="f") SetFillColor(color);
  else              SetLineColor(color);
}
void GPFRecHit::setInitialColor ( ) [virtual]

Implements GPFBase.

Definition at line 58 of file GPFRecHit.cc.

References GPFBase::color_, and option_.

{
  if (option_=="f") SetFillColor(color_);
  else              SetLineColor(color_);
}
void GPFRecHit::setNewSize ( ) [virtual]

Implements GPFBase.

Definition at line 71 of file GPFRecHit.cc.

{
  //not implemented
}
void GPFRecHit::setNewStyle ( ) [virtual]

Implements GPFBase.

Definition at line 76 of file GPFRecHit.cc.

{
  //not implemented
}

Member Data Documentation

double GPFRecHit::en_ [private]

energy

Definition at line 38 of file GPFRecHit.h.

Referenced by getEnergy(), and GPFRecHit().

std::string GPFRecHit::option_ [private]

root draw option

Definition at line 41 of file GPFRecHit.h.

Referenced by draw(), getOption(), setColor(), and setInitialColor().

Definition at line 35 of file GPFRecHit.h.

Referenced by GPFRecHit(), and Print().