CMS 3D CMS Logo

Public Member Functions | Private Attributes

GPFTrack Class Reference

#include <GPFTrack.h>

Inheritance diagram for GPFTrack:
GPFBase

List of all members.

Public Member Functions

virtual void draw ()
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
double getPt ()
 GPFTrack (DisplayManager *dm, int view, int ident, reco::PFRecTrack *tra, int size, double *x, double *y, double pt, TAttMarker *attm, TAttLine *attl, std::string option)
const GPFTrackoperator= (const GPFTrack &other)
virtual void Print ()
void setColor (int newcol)
void setColor ()
void setInitialColor ()
void setNewSize ()
void setNewStyle ()
virtual ~GPFTrack ()

Private Attributes

std::string option_
double pt_
reco::PFRecTracktrack_

Detailed Description

Definition at line 15 of file GPFTrack.h.


Constructor & Destructor Documentation

GPFTrack::GPFTrack ( DisplayManager dm,
int  view,
int  ident,
reco::PFRecTrack tra,
int  size,
double *  x,
double *  y,
double  pt,
TAttMarker *  attm,
TAttLine *  attl,
std::string  option 
)

Definition at line 11 of file GPFTrack.cc.

References GPFBase::lineAttr_, and GPFBase::markerAttr_.

  : GPFBase(display,view,ident,attm,attl ),
    TGraph(size,x,y), track_(tra),pt_(pt), option_(option)
{
  ResetBit(kCanDelete);
  
  SetLineColor(lineAttr_->GetLineColor());
  SetLineStyle(lineAttr_->GetLineStyle());
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
  SetMarkerSize(markerAttr_->GetMarkerSize());
  SetMarkerColor(markerAttr_->GetMarkerColor());
  
}
virtual GPFTrack::~GPFTrack ( ) [inline, virtual]

Definition at line 21 of file GPFTrack.h.

{;}

Member Function Documentation

void GPFTrack::draw ( ) [virtual]

Reimplemented from GPFBase.

Definition at line 50 of file GPFTrack.cc.

References option_.

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

Definition at line 33 of file GPFTrack.cc.

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

{
  // Execute action corresponding to a left mouse button click 
  //on a GPFTrack object in the window

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

Reimplemented from GPFBase.

Definition at line 24 of file GPFTrack.h.

References pt_.

{ return pt_;}
const GPFTrack& GPFTrack::operator= ( const GPFTrack other) [inline]

Definition at line 36 of file GPFTrack.h.

References track_.

                                                     {
    track_ = other.track_;
    return *this;
  }
void GPFTrack::Print ( void  ) [virtual]

Definition at line 27 of file GPFTrack.cc.

References BREMID, gather_cfg::cout, GPFBase::origId_, SHIFTID, and track_.

Referenced by ExecuteEvent().

{
   if ((origId_>>SHIFTID) != BREMID) 
     std::cout<<*track_<<std::endl;
}
void GPFTrack::setColor ( int  newcol) [virtual]

Implements GPFBase.

Definition at line 62 of file GPFTrack.cc.

References option_.

{
  if (option_=="f") SetFillColor(color);
  else              SetLineColor(color);
  SetMarkerColor(color);
}
void GPFTrack::setColor ( ) [virtual]

Implements GPFBase.

Definition at line 55 of file GPFTrack.cc.

References GPFBase::lineAttr_, GPFBase::markerAttr_, and option_.

{
  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
  else              SetLineColor(lineAttr_->GetLineColor());
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFTrack::setInitialColor ( ) [virtual]

Implements GPFBase.

Definition at line 70 of file GPFTrack.cc.

References GPFBase::lineAttr_, GPFBase::markerAttr_, and option_.

{
  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
  else              SetLineColor(lineAttr_->GetLineColor());
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFTrack::setNewSize ( ) [virtual]

Implements GPFBase.

Definition at line 78 of file GPFTrack.cc.

References GPFBase::markerAttr_.

{
  SetMarkerSize(markerAttr_->GetMarkerSize());
}
void GPFTrack::setNewStyle ( ) [virtual]

Implements GPFBase.

Definition at line 83 of file GPFTrack.cc.

References GPFBase::markerAttr_.

{
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
}

Member Data Documentation

std::string GPFTrack::option_ [private]

Definition at line 45 of file GPFTrack.h.

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

double GPFTrack::pt_ [private]

Definition at line 44 of file GPFTrack.h.

Referenced by getPt().

Definition at line 43 of file GPFTrack.h.

Referenced by operator=(), and Print().