CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
FWPFPatJetLegoProxyBuilder< T > Class Template Reference

#include <FWPFPatJetLegoProxyBuilder.h>

Inheritance diagram for FWPFPatJetLegoProxyBuilder< T >:
FWSimpleProxyBuilderTemplate< T > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

void build (const T &, unsigned int, TEveElement &, const FWViewContext *) override
 
 FWPFPatJetLegoProxyBuilder ()
 
bool havePerViewProduct (FWViewType::EType) const override
 
void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
 
void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
 
 ~FWPFPatJetLegoProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< T >
 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 haveSingleProduct () 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 ()
 

Private Member Functions

 FWPFPatJetLegoProxyBuilder (const FWPFPatJetLegoProxyBuilder &)=delete
 
const FWPFPatJetLegoProxyBuilderoperator= (FWPFPatJetLegoProxyBuilder &)=delete
 

Additional Inherited Members

- 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...
 
- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< T >
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
virtual void buildViewType (const T &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const TmodelData (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
virtual void cleanLocal ()
 
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 modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

template<class T>
class FWPFPatJetLegoProxyBuilder< T >

Definition at line 28 of file FWPFPatJetLegoProxyBuilder.h.

Constructor & Destructor Documentation

template<class T >
FWPFPatJetLegoProxyBuilder< T >::~FWPFPatJetLegoProxyBuilder ( )
override

Definition at line 6 of file FWPFPatJetLegoProxyBuilder.cc.

6 {}
template<class T>
FWPFPatJetLegoProxyBuilder< T >::FWPFPatJetLegoProxyBuilder ( const FWPFPatJetLegoProxyBuilder< T > &  )
privatedelete

Member Function Documentation

template<class T>
void FWPFPatJetLegoProxyBuilder< T >::build ( const T iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overridevirtual

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< T >.

Definition at line 10 of file FWPFPatJetLegoProxyBuilder.cc.

References create_public_lumi_plots::color, FWProxyBuilderBase::context(), FWProxyBuilderBase::item(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().

11 {
12  std::vector<reco::PFCandidatePtr > consts = iData.getPFConstituents();
13 
14  typedef std::vector<reco::PFCandidatePtr >::const_iterator IC;
15 
16  for( IC ic = consts.begin(); ic != consts.end(); ++ic )
17  {
18  const reco::PFCandidatePtr pfCandPtr = *ic;
19 
20  FWLegoCandidate *candidate = new FWLegoCandidate( vc, FWProxyBuilderBase::context(), pfCandPtr->energy(), pfCandPtr->et(),
21  pfCandPtr->pt(), pfCandPtr->eta(), pfCandPtr->phi() );
22  candidate->SetMarkerColor( FWProxyBuilderBase::item()->defaultDisplayProperties().color() );
23  fireworks::setTrackTypePF( (*pfCandPtr), candidate );
24  FWProxyBuilderBase::setupAddElement( candidate, &oItemHolder );
25 
26  FWProxyBuilderBase::context().voteMaxEtAndEnergy( pfCandPtr->et(), pfCandPtr->energy() );
27  }
28 }
const fireworks::Context & context() const
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:183
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWEventItem * item() const
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
template<class T>
bool FWPFPatJetLegoProxyBuilder< T >::havePerViewProduct ( FWViewType::EType  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 37 of file FWPFPatJetLegoProxyBuilder.h.

37 { return true; }
template<class T >
void FWPFPatJetLegoProxyBuilder< T >::localModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 51 of file FWPFPatJetLegoProxyBuilder.cc.

References FWDisplayProperties::color(), FWModelId::index(), FWProxyBuilderBase::item(), and FWEventItem::modelInfo().

Referenced by FWPFPatJetLegoProxyBuilder< reco::PFJet >::havePerViewProduct().

52 {
53  // line set marker is not same color as line, have to fix it here
54  if ( ( parent )->HasChildren() )
55  {
56  for( TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); ++j )
57  {
58  FWLegoCandidate *cand = dynamic_cast<FWLegoCandidate*> ( *j );
59  const FWDisplayProperties &dp = FWProxyBuilderBase::item()->modelInfo( iId.index() ).displayProperties();
60  cand->SetMarkerColor( dp.color() );
61  cand->ElementChanged();
62  }
63  }
64 }
const FWEventItem * item() const
Color_t color() const
int index() const
Definition: FWModelId.h:49
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:537
template<class T>
const FWPFPatJetLegoProxyBuilder& FWPFPatJetLegoProxyBuilder< T >::operator= ( FWPFPatJetLegoProxyBuilder< T > &  )
privatedelete
template<class T >
void FWPFPatJetLegoProxyBuilder< T >::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 32 of file FWPFPatJetLegoProxyBuilder.cc.

References FWProxyBuilderBase::context(), mps_fire::i, and FWLegoCandidate::updateScale().

Referenced by FWPFPatJetLegoProxyBuilder< reco::PFJet >::havePerViewProduct().

33 {
34  // loop items in product
35  for( TEveElement::List_i i = parent->BeginChildren(); i!= parent->EndChildren(); ++i )
36  {
37  if ( ( *i )->HasChildren() )
38  {
39  // loop elements for the reco::PFJet item
40  for( TEveElement::List_i j = (*i)->BeginChildren(); j != (*i)->EndChildren(); ++j )
41  {
42  FWLegoCandidate *cand = dynamic_cast<FWLegoCandidate*> ( *j );
44  }
45  }
46  }
47 }
const fireworks::Context & context() const
void updateScale(const FWViewContext *vc, const fireworks::Context &)