CMS 3D CMS Logo

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

Public Member Functions

 FWCandidateLegoProxyBuilder ()
 
 FWCandidateLegoProxyBuilder (const FWCandidateLegoProxyBuilder &)=delete
 
bool havePerViewProduct (FWViewType::EType) const override
 
void localModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *) override
 
const FWCandidateLegoProxyBuilderoperator= (const FWCandidateLegoProxyBuilder &)=delete
 
const std::string & purpose () const
 
void scaleProduct (TEveElementList *, FWViewType::EType, const FWViewContext *) override
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWCandidateLegoProxyBuilder () override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Candidate >
 FWSimpleProxyBuilderTemplate ()
 
 FWSimpleProxyBuilderTemplate (const FWSimpleProxyBuilderTemplate &)=delete
 
const
FWSimpleProxyBuilderTemplate
operator= (const FWSimpleProxyBuilderTemplate &)=delete
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)=delete
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)=delete
 
 ~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 ()
 

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

void build (const reco::Candidate &, unsigned int, TEveElement &, const FWViewContext *) override
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Candidate >
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 reco::Candidate &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const reco::CandidatemodelData (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

Definition at line 27 of file FWCandidateLegoProxyBuilder.cc.

Constructor & Destructor Documentation

FWCandidateLegoProxyBuilder::FWCandidateLegoProxyBuilder ( )
inline

Definition at line 30 of file FWCandidateLegoProxyBuilder.cc.

30 {}
FWCandidateLegoProxyBuilder::~FWCandidateLegoProxyBuilder ( )
inlineoverride

Definition at line 31 of file FWCandidateLegoProxyBuilder.cc.

31 {}
FWCandidateLegoProxyBuilder::FWCandidateLegoProxyBuilder ( const FWCandidateLegoProxyBuilder )
delete

Member Function Documentation

void FWCandidateLegoProxyBuilder::build ( const reco::Candidate iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overrideprivatevirtual

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< reco::Candidate >.

Definition at line 80 of file FWCandidateLegoProxyBuilder.cc.

References FWProxyBuilderBase::context(), reco::Candidate::energy(), reco::Candidate::et(), reco::Candidate::eta(), FWProxyBuilderBase::item(), reco::Candidate::phi(), reco::Candidate::pt(), FWProxyBuilderBase::setupAddElement(), and fireworks::Context::voteMaxEtAndEnergy().

83  {
84  FWLegoCandidate *candidate =
85  new FWLegoCandidate(vc, context(), iData.energy(), iData.et(), iData.pt(), iData.eta(), iData.phi());
86 
87  candidate->SetMarkerColor(item()->defaultDisplayProperties().color());
88  context().voteMaxEtAndEnergy(iData.et(), iData.energy());
89 
90  setupAddElement(candidate, &oItemHolder);
91 }
const fireworks::Context & context() const
virtual double energy() const =0
energy
virtual double et() const =0
transverse energy
virtual double pt() const =0
transverse momentum
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
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity
const std::string & FWCandidateLegoProxyBuilder::classPurpose ( )
static

Definition at line 97 of file FWCandidateLegoProxyBuilder.cc.

const std::string & FWCandidateLegoProxyBuilder::classRegisterTypeName ( )
static

Definition at line 97 of file FWCandidateLegoProxyBuilder.cc.

const std::string & FWCandidateLegoProxyBuilder::classTypeName ( )
static

Definition at line 97 of file FWCandidateLegoProxyBuilder.cc.

const std::string & FWCandidateLegoProxyBuilder::classView ( )
static

Definition at line 97 of file FWCandidateLegoProxyBuilder.cc.

bool FWCandidateLegoProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 34 of file FWCandidateLegoProxyBuilder.cc.

34 { return true; }
void FWCandidateLegoProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 66 of file FWCandidateLegoProxyBuilder.cc.

References FWModelId::index(), FWProxyBuilderBase::item(), and SpecificationBuilder_cfi::parent().

69  {
70  // Line set marker is nto the same color as line, have to fix it here
71  if ((parent)->HasChildren()) {
72  TEveElement *el = (parent)->FirstChild(); // There is only one child
73  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate *>(el);
74  candidate->SetMarkerColor(item()->modelInfo(iId.index()).displayProperties().color());
75  candidate->ElementChanged();
76  }
77 }
const FWEventItem * item() const
int index() const
Definition: FWModelId.h:41
const FWCandidateLegoProxyBuilder& FWCandidateLegoProxyBuilder::operator= ( const FWCandidateLegoProxyBuilder )
delete
const std::string& FWCandidateLegoProxyBuilder::purpose ( ) const
inline

Definition at line 38 of file FWCandidateLegoProxyBuilder.cc.

44 :
45  // --------------------- Member Functions --------------------------
void FWCandidateLegoProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 53 of file FWCandidateLegoProxyBuilder.cc.

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

55  {
56  for (TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i) {
57  if ((*i)->HasChildren()) {
58  TEveElement *el = (*i)->FirstChild(); // There is only one child
59  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate *>(el);
60  candidate->updateScale(vc, context());
61  }
62  }
63 }
const fireworks::Context & context() const
void updateScale(const FWViewContext *vc, const fireworks::Context &)
const std::string& FWCandidateLegoProxyBuilder::typeName ( ) const
inline

Definition at line 38 of file FWCandidateLegoProxyBuilder.cc.

44 :
45  // --------------------- Member Functions --------------------------
const std::string& FWCandidateLegoProxyBuilder::view ( ) const
inline

Definition at line 38 of file FWCandidateLegoProxyBuilder.cc.

44 :
45  // --------------------- Member Functions --------------------------