CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWElectronProxyBuilder Class Reference

Inheritance diagram for FWElectronProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::GsfElectron > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

virtual void cleanLocal ()
 FWElectronProxyBuilder ()
virtual bool haveSingleProduct () const
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWElectronProxyBuilder ()

Private Member Functions

virtual void buildViewType (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *)
 FWElectronProxyBuilder (const FWElectronProxyBuilder &)
const FWElectronProxyBuilderoperator= (const FWElectronProxyBuilder &)
TEveElementList * requestCommon ()

Private Attributes

TEveElementList * m_common

Detailed Description

Definition at line 34 of file FWElectronProxyBuilder.cc.


Constructor & Destructor Documentation

FWElectronProxyBuilder::FWElectronProxyBuilder ( )

Definition at line 57 of file FWElectronProxyBuilder.cc.

References m_common.

                                              :
   m_common(0)
{
   m_common = new TEveElementList( "common electron scene" );
   m_common->IncDenyDestroy();
}
FWElectronProxyBuilder::~FWElectronProxyBuilder ( ) [virtual]

Definition at line 64 of file FWElectronProxyBuilder.cc.

References m_common.

{
   m_common->DecDenyDestroy();
}
FWElectronProxyBuilder::FWElectronProxyBuilder ( const FWElectronProxyBuilder ) [private]

Member Function Documentation

void FWElectronProxyBuilder::buildViewType ( const reco::GsfElectron iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  type,
const FWViewContext  
) [private, virtual]
void FWElectronProxyBuilder::cleanLocal ( ) [virtual]

Reimplemented from FWProxyBuilderBase.

Definition at line 94 of file FWElectronProxyBuilder.cc.

References m_common.

{
   m_common->DestroyElements();
}
virtual bool FWElectronProxyBuilder::haveSingleProduct ( void  ) const [inline, virtual]

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWElectronProxyBuilder.cc.

{ return false; }
const FWElectronProxyBuilder& FWElectronProxyBuilder::operator= ( const FWElectronProxyBuilder ) [private]
FWElectronProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )
TEveElementList * FWElectronProxyBuilder::requestCommon ( ) [private]

Definition at line 70 of file FWElectronProxyBuilder.cc.

References FWProxyBuilderBase::context(), metsig::electron, funct::false, fireworks::Context::getTrackPropagator(), reco::GsfElectron::gsfTrack(), i, FWProxyBuilderBase::item(), m_common, FWSimpleProxyBuilderTemplate< reco::GsfElectron >::modelData(), fireworks::prepareCandidate(), fireworks::prepareTrack(), FWProxyBuilderBase::setupElement(), and FWEventItem::size().

Referenced by buildViewType().

{
   if( m_common->HasChildren() == false )
   {
      for (int i = 0; i < static_cast<int>(item()->size()); ++i)
      {
         const reco::GsfElectron& electron = modelData(i);

         TEveTrack* track(0);
         if( electron.gsfTrack().isAvailable() )
            track = fireworks::prepareTrack( *electron.gsfTrack(),
                                             context().getTrackPropagator());
         else
            track = fireworks::prepareCandidate( electron,
                                                 context().getTrackPropagator());
         track->MakeTrack();
         setupElement( track );
         m_common->AddElement( track );
      }
   }
   return m_common;
}

Member Data Documentation

TEveElementList* FWElectronProxyBuilder::m_common [private]