CMS 3D CMS Logo

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

void buildViewType (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType type, const FWViewContext *) override
 
void cleanLocal () override
 
 FWElectronProxyBuilder ()
 
bool haveSingleProduct () const override
 
const std::string & purpose () const
 
void setItem (const FWEventItem *iItem) override
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWElectronProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::GsfElectron >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 ~FWSimpleProxyBuilder () override
 
- 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 &)
 
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 &)=delete
 
const FWElectronProxyBuilderoperator= (const FWElectronProxyBuilder &)=delete
 
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 >
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void build (const reco::GsfElectron &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
const reco::GsfElectronmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- 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 35 of file FWElectronProxyBuilder.cc.

Constructor & Destructor Documentation

FWElectronProxyBuilder::FWElectronProxyBuilder ( )

Definition at line 64 of file FWElectronProxyBuilder.cc.

References m_common.

64  :
65  m_common(nullptr)
66 {
67  m_common = new TEveElementList( "common electron scene" );
68  m_common->IncDenyDestroy();
69 }
FWElectronProxyBuilder::~FWElectronProxyBuilder ( )
override

Definition at line 71 of file FWElectronProxyBuilder.cc.

References m_common.

72 {
73  m_common->DecDenyDestroy();
74 }
FWElectronProxyBuilder::FWElectronProxyBuilder ( const FWElectronProxyBuilder )
privatedelete

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 121 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 l1t::tracks.

Referenced by haveSingleProduct().

122 {
123  TEveElementList* tracks = requestCommon();
124  TEveElement::List_i trkIt = tracks->BeginChildren();
125  std::advance(trkIt, iIndex);
126  setupAddElement(*trkIt, &oItemHolder );
127 
130  electron.superCluster(),
131  electron.phi(),
132  oItemHolder );
133  else if( type == FWViewType::kRhoZ )
135  electron.superCluster(),
136  electron.phi(),
137  oItemHolder );
138 }
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()
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 115 of file FWElectronProxyBuilder.cc.

References m_common.

Referenced by haveSingleProduct().

116 {
117  m_common->DestroyElements();
118 }
bool FWElectronProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 42 of file FWElectronProxyBuilder.cc.

References buildViewType(), cleanLocal(), FWProxyBuilderBase::cleanLocal(), and setItem().

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

Definition at line 89 of file FWElectronProxyBuilder.cc.

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

Referenced by buildViewType().

90 {
91  if( m_common->HasChildren() == false )
92  {
93  int width = item()->getConfig()->value<long>("LineWidth");
94  for (int i = 0; i < static_cast<int>(item()->size()); ++i)
95  {
97 
98  TEveTrack* track(nullptr);
99  if( electron.gsfTrack().isAvailable() )
100  track = fireworks::prepareTrack( *electron.gsfTrack(),
102  else
104  context().getTrackPropagator());
105  track->MakeTrack();
106  track->SetLineWidth(width);
107  setupElement( track );
108  m_common->AddElement( track );
109  }
110  }
111  return m_common;
112 }
bool isAvailable() const
Definition: Ref.h:577
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
const fireworks::Context & context() const
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:169
TEveTrack * prepareTrack(const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
Definition: TrackUtils.cc:69
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:73
const FWEventItem * item() const
size_t size() const
Definition: FWEventItem.cc:550
TEveTrack * prepareCandidate(const reco::Candidate &track, TEveTrackPropagator *propagator)
void setupElement(TEveElement *el, bool color=true) const
void FWElectronProxyBuilder::setItem ( const FWEventItem iItem)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 78 of file FWElectronProxyBuilder.cc.

References FWProxyBuilderConfiguration::assertParam(), FWEventItem::getConfig(), and FWProxyBuilderBase::setItem().

Referenced by Vispa.Plugins.EdmBrowser.EventContentView.EventContentView::_addRow(), Vispa.Views.TableView.TableView::_createItem(), Vispa.Views.PropertyView.PropertyView::addCategory(), Vispa.Views.PropertyView.PropertyView::append(), and haveSingleProduct().

79 {
81 
82  if (iItem) {
83  iItem->getConfig()->assertParam("LineWidth", long(1), long(1), long(4));
84  }
85 }
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:169
virtual void setItem(const FWEventItem *iItem)
FWGenericParameter< T > * assertParam(const std::string &name, T def)
const std::string& FWElectronProxyBuilder::typeName ( ) const
inline
const std::string& FWElectronProxyBuilder::view ( ) const
inline

Member Data Documentation

TEveElementList* FWElectronProxyBuilder::m_common
private