CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Static Private Attributes

FWGenParticleProxyBuilder Class Reference

Inheritance diagram for FWGenParticleProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::GenParticle > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWGenParticleProxyBuilder ()
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWGenParticleProxyBuilder ()

Private Member Functions

void build (const reco::GenParticle &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 FWGenParticleProxyBuilder (const FWGenParticleProxyBuilder &)
const FWGenParticleProxyBuilderoperator= (const FWGenParticleProxyBuilder &)

Static Private Attributes

static TDatabasePDG * s_pdg = 0

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 30 of file FWGenParticleProxyBuilder.cc.


Constructor & Destructor Documentation

FWGenParticleProxyBuilder::FWGenParticleProxyBuilder ( ) [inline]

Definition at line 33 of file FWGenParticleProxyBuilder.cc.

{}
virtual FWGenParticleProxyBuilder::~FWGenParticleProxyBuilder ( ) [inline, virtual]

Definition at line 34 of file FWGenParticleProxyBuilder.cc.

{}
FWGenParticleProxyBuilder::FWGenParticleProxyBuilder ( const FWGenParticleProxyBuilder ) [private]

Member Function Documentation

void FWGenParticleProxyBuilder::build ( const reco::GenParticle iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
) [private, virtual]

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< reco::GenParticle >.

Definition at line 55 of file FWGenParticleProxyBuilder.cc.

References FWProxyBuilderBase::context(), fireworks::prepareCandidate(), s_pdg, and FWProxyBuilderBase::setupAddElement().

{
   if (!s_pdg)
      s_pdg = new TDatabasePDG();
 
 
   TEveTrack* trk = fireworks::prepareCandidate( iData, context().getTrackPropagator() );    
   trk->MakeTrack();
   /*
     trk->SetTitle(s);
     char s[1024];
     TParticlePDG* pID = s_pdg->GetParticle(iData.pdgId());
     if ( pID )
     sprintf(s,"gen %s, Pt: %0.1f GeV", pID->GetName(), iData.pt());
     else
     sprintf(s,"gen pdg %d, Pt: %0.1f GeV", iData.pdgId(), iData.pt());
   */
   setupAddElement(trk, &oItemHolder);
}
const FWGenParticleProxyBuilder& FWGenParticleProxyBuilder::operator= ( const FWGenParticleProxyBuilder ) [private]
FWGenParticleProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )

Member Data Documentation

TDatabasePDG * FWGenParticleProxyBuilder::s_pdg = 0 [static, private]

Definition at line 47 of file FWGenParticleProxyBuilder.cc.

Referenced by build().