CMS 3D CMS Logo

Public Member Functions | Private Attributes

GPFCluster Class Reference

#include <GPFCluster.h>

Inheritance diagram for GPFCluster:
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 ()
 GPFCluster (DisplayManager *dm, int view, int ident, const reco::PFCluster *clus, double x, double y, TAttMarker *attm)
const GPFClusteroperator= (const GPFCluster &other)
virtual void Print ()
void setColor (int newcol)
void setColor ()
void setInitialColor ()
void setNewSize ()
void setNewStyle ()
virtual ~GPFCluster ()

Private Attributes

const reco::PFClusterclus_
double en_

Detailed Description

Definition at line 14 of file GPFCluster.h.


Constructor & Destructor Documentation

GPFCluster::GPFCluster ( DisplayManager dm,
int  view,
int  ident,
const reco::PFCluster clus,
double  x,
double  y,
TAttMarker *  attm 
)

Definition at line 10 of file GPFCluster.cc.

References clus_, en_, reco::PFCluster::energy(), and GPFBase::markerAttr_.

  : GPFBase(display,view,ident, attm ),
    TMarker(x,y,1),clus_(clus) {

  ResetBit(kCanDelete);
  en_=clus_->energy();
  SetMarkerColor(markerAttr_->GetMarkerColor());
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
  SetMarkerSize(markerAttr_->GetMarkerSize());
}   
virtual GPFCluster::~GPFCluster ( ) [inline, virtual]

Definition at line 20 of file GPFCluster.h.

{;}

Member Function Documentation

void GPFCluster::draw ( ) [virtual]

Reimplemented from GPFBase.

Definition at line 46 of file GPFCluster.cc.

{
  TMarker::Draw();
}
void GPFCluster::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Definition at line 30 of file GPFCluster.cc.

References GPFBase::display_, DisplayManager::findAndDraw(), DisplayManager::findBlock(), 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_->findBlock(origId_);
    display_->findAndDraw(origId_);
    break;
  default:break;
  }    
}
double GPFCluster::getEnergy ( ) [inline, virtual]

Reimplemented from GPFBase.

Definition at line 22 of file GPFCluster.h.

References en_.

{return en_;}
const GPFCluster& GPFCluster::operator= ( const GPFCluster other) [inline]

Definition at line 34 of file GPFCluster.h.

References clus_.

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

Definition at line 25 of file GPFCluster.cc.

References clus_, and gather_cfg::cout.

Referenced by ExecuteEvent().

{
  std::cout<<*clus_<<std::endl;
}
void GPFCluster::setColor ( int  newcol) [virtual]

Implements GPFBase.

Definition at line 56 of file GPFCluster.cc.

{
  SetMarkerColor(newcol);
}
void GPFCluster::setColor ( ) [virtual]

Implements GPFBase.

Definition at line 51 of file GPFCluster.cc.

References GPFBase::markerAttr_.

{
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFCluster::setInitialColor ( ) [virtual]

Implements GPFBase.

Definition at line 61 of file GPFCluster.cc.

References GPFBase::markerAttr_.

{
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFCluster::setNewSize ( ) [virtual]

Implements GPFBase.

Definition at line 71 of file GPFCluster.cc.

References GPFBase::markerAttr_.

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

Implements GPFBase.

Definition at line 66 of file GPFCluster.cc.

References GPFBase::markerAttr_.

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

Member Data Documentation

Definition at line 40 of file GPFCluster.h.

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

double GPFCluster::en_ [private]

Definition at line 42 of file GPFCluster.h.

Referenced by getEnergy(), and GPFCluster().