CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
FWElectronProxyBuilder Class Reference
Inheritance diagram for FWElectronProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::GsfElectron > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

virtual void buildViewType (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
virtual void cleanLocal () override
 
 FWElectronProxyBuilder ()
 
virtual bool haveSingleProduct () const override
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWElectronProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::GsfElectron >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
virtual void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- Static Public Member Functions inherited from FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Private Member Functions

 FWElectronProxyBuilder (const FWElectronProxyBuilder &)
 
const FWElectronProxyBuilderoperator= (const FWElectronProxyBuilder &)
 
TEveElementList * requestCommon ()
 

Private Attributes

TEveElementList * m_common
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::GsfElectron >
virtual void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context)
 
virtual void build (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
virtual void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context)
 
const reco::GsfElectronmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- Protected Member Functions inherited from FWProxyBuilderBase
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 33 of file FWElectronProxyBuilder.cc.

Constructor & Destructor Documentation

FWElectronProxyBuilder::FWElectronProxyBuilder ( )

Definition at line 59 of file FWElectronProxyBuilder.cc.

References m_common.

59  :
60  m_common(0)
61 {
62  m_common = new TEveElementList( "common electron scene" );
63  m_common->IncDenyDestroy();
64 }
FWElectronProxyBuilder::~FWElectronProxyBuilder ( )
virtual

Definition at line 66 of file FWElectronProxyBuilder.cc.

References m_common.

67 {
68  m_common->DecDenyDestroy();
69 }
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  
)
overridevirtual

Reimplemented from FWSimpleProxyBuilderTemplate< reco::GsfElectron >.

Definition at line 102 of file FWElectronProxyBuilder.cc.

References FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), reco::LeafCandidate::phi(), requestCommon(), FWProxyBuilderBase::setupAddElement(), reco::GsfElectron::superCluster(), and testEve_cfg::tracks.

103 {
104  TEveElementList* tracks = requestCommon();
105  TEveElement::List_i trkIt = tracks->BeginChildren();
106  std::advance(trkIt, iIndex);
107  setupAddElement(*trkIt, &oItemHolder );
108 
111  electron.superCluster(),
112  electron.phi(),
113  oItemHolder );
114  else if( type == FWViewType::kRhoZ )
116  electron.superCluster(),
117  electron.phi(),
118  oItemHolder );
119 }
type
Definition: HCALResponse.h:21
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
bool makeRhoZSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
TEveElementList * requestCommon()
tuple tracks
Definition: testEve_cfg.py:39
bool makeRhoPhiSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
const std::string & FWElectronProxyBuilder::classPurpose ( )
static
const std::string & FWElectronProxyBuilder::classRegisterTypeName ( )
static
const std::string & FWElectronProxyBuilder::classTypeName ( )
static
const std::string & FWElectronProxyBuilder::classView ( )
static
void FWElectronProxyBuilder::cleanLocal ( )
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 96 of file FWElectronProxyBuilder.cc.

References m_common.

97 {
98  m_common->DestroyElements();
99 }
virtual bool FWElectronProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 40 of file FWElectronProxyBuilder.cc.

40 { return false; }
const FWElectronProxyBuilder& FWElectronProxyBuilder::operator= ( const FWElectronProxyBuilder )
private
const std::string& FWElectronProxyBuilder::purpose ( ) const
inline
TEveElementList * FWElectronProxyBuilder::requestCommon ( )
private

Definition at line 72 of file FWElectronProxyBuilder.cc.

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

Referenced by buildViewType().

73 {
74  if( m_common->HasChildren() == false )
75  {
76  for (int i = 0; i < static_cast<int>(item()->size()); ++i)
77  {
79 
80  TEveTrack* track(0);
81  if( electron.gsfTrack().isAvailable() )
82  track = fireworks::prepareTrack( *electron.gsfTrack(),
84  else
85  track = fireworks::prepareCandidate( electron,
86  context().getTrackPropagator());
87  track->MakeTrack();
88  setupElement( track );
89  m_common->AddElement( track );
90  }
91  }
92  return m_common;
93 }
bool isAvailable() const
Definition: Ref.h:576
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
TEveTrack * prepareTrack(const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
Definition: TrackUtils.cc:75
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:73
const FWEventItem * item() const
size_t size() const
Definition: FWEventItem.cc:548
TEveTrack * prepareCandidate(const reco::Candidate &track, TEveTrackPropagator *propagator)
volatile std::atomic< bool > shutdown_flag false
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:183
void setupElement(TEveElement *el, bool color=true) const
const std::string& FWElectronProxyBuilder::typeName ( ) const
inline
const std::string& FWElectronProxyBuilder::view ( ) const
inline

Member Data Documentation

TEveElementList* FWElectronProxyBuilder::m_common
private