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 27 of file FWPFPatJetLegoProxyBuilder.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file FWPFPatJetLegoProxyBuilder.cc.

8 {}
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 12 of file FWPFPatJetLegoProxyBuilder.cc.

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

15  {
16  std::vector<reco::PFCandidatePtr> consts = iData.getPFConstituents();
17 
18  typedef std::vector<reco::PFCandidatePtr>::const_iterator IC;
19 
20  for (IC ic = consts.begin(); ic != consts.end(); ++ic) {
21  const reco::PFCandidatePtr pfCandPtr = *ic;
22 
23  FWLegoCandidate* candidate = new FWLegoCandidate(vc,
25  pfCandPtr->energy(),
26  pfCandPtr->et(),
27  pfCandPtr->pt(),
28  pfCandPtr->eta(),
29  pfCandPtr->phi());
30  candidate->SetMarkerColor(FWProxyBuilderBase::item()->defaultDisplayProperties().color());
31  fireworks::setTrackTypePF((*pfCandPtr), candidate);
32  FWProxyBuilderBase::setupAddElement(candidate, &oItemHolder);
33 
34  FWProxyBuilderBase::context().voteMaxEtAndEnergy(pfCandPtr->et(), pfCandPtr->energy());
35  }
36 }
const fireworks::Context & context() const
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
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 35 of file FWPFPatJetLegoProxyBuilder.h.

35 { 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 57 of file FWPFPatJetLegoProxyBuilder.cc.

References FWModelId::index(), FWProxyBuilderBase::item(), and dqmiolumiharvest::j.

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

60  {
61  // line set marker is not same color as line, have to fix it here
62  if ((parent)->HasChildren()) {
63  for (TEveElement::List_i j = parent->BeginChildren(); j != parent->EndChildren(); ++j) {
64  FWLegoCandidate* cand = dynamic_cast<FWLegoCandidate*>(*j);
65  cand->SetMarkerColor(FWProxyBuilderBase::item()->modelInfo(iId.index()).displayProperties().color());
66  cand->ElementChanged();
67  }
68  }
69 }
const FWEventItem * item() const
int index() const
Definition: FWModelId.h:41
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 40 of file FWPFPatJetLegoProxyBuilder.cc.

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

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

42  {
43  // loop items in product
44  for (TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i) {
45  if ((*i)->HasChildren()) {
46  // loop elements for the reco::PFJet item
47  for (TEveElement::List_i j = (*i)->BeginChildren(); j != (*i)->EndChildren(); ++j) {
48  FWLegoCandidate* cand = dynamic_cast<FWLegoCandidate*>(*j);
50  }
51  }
52  }
53 }
const fireworks::Context & context() const
void updateScale(const FWViewContext *vc, const fireworks::Context &)