CMS 3D CMS Logo

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

Public Member Functions

 FWCandidateLegoProxyBuilder ()
 
virtual bool havePerViewProduct (FWViewType::EType) const override
 
virtual void localModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *) override
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual void scaleProduct (TEveElementList *, FWViewType::EType, const FWViewContext *) override
 
virtual ~FWCandidateLegoProxyBuilder ()
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::Candidate >
 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 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

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

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< reco::Candidate >
const reco::CandidatemodelData (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
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 31 of file FWCandidateLegoProxyBuilder.cc.

31 {}
virtual FWCandidateLegoProxyBuilder::~FWCandidateLegoProxyBuilder ( )
inlinevirtual

Definition at line 32 of file FWCandidateLegoProxyBuilder.cc.

32 {}
FWCandidateLegoProxyBuilder::FWCandidateLegoProxyBuilder ( const FWCandidateLegoProxyBuilder )
private

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 88 of file FWCandidateLegoProxyBuilder.cc.

References create_public_lumi_plots::color, 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().

90 {
91  FWLegoCandidate *candidate = new FWLegoCandidate( vc, context(), iData.energy(),
92  iData.et(), iData.pt(),
93  iData.eta(), iData.phi() );
94 
95  candidate->SetMarkerColor( item()->defaultDisplayProperties().color() );
96  context().voteMaxEtAndEnergy( iData.et(), iData.energy() );
97 
98  setupAddElement( candidate, &oItemHolder );
99 }
const fireworks::Context & context() const
virtual double energy() const =0
energy
virtual double et() const =0
transverse energy
virtual float eta() const =0
momentum pseudorapidity
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:184
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
virtual float phi() const =0
momentum azimuthal angle
const FWEventItem * item() const
virtual float pt() const =0
transverse momentum
virtual bool FWCandidateLegoProxyBuilder::havePerViewProduct ( FWViewType::EType  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 35 of file FWCandidateLegoProxyBuilder.cc.

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

Reimplemented from FWProxyBuilderBase.

Definition at line 72 of file FWCandidateLegoProxyBuilder.cc.

References FWDisplayProperties::color(), reco::dp, FWModelId::index(), FWProxyBuilderBase::item(), FWEventItem::modelInfo(), and dbtoconf::parent.

74 {
75  // Line set marker is nto the same color as line, have to fix it here
76  if( (parent)->HasChildren() )
77  {
78  TEveElement *el = (parent)->FirstChild(); // There is only one child
79  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
80  const FWDisplayProperties &dp = item()->modelInfo( iId.index() ).displayProperties();
81  candidate->SetMarkerColor( dp.color() );
82  candidate->ElementChanged();
83  }
84 }
list parent
Definition: dbtoconf.py:74
const FWEventItem * item() const
Color_t color() const
int index() const
Definition: FWModelId.h:49
auto dp
Definition: deltaR.h:24
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
const FWCandidateLegoProxyBuilder& FWCandidateLegoProxyBuilder::operator= ( const FWCandidateLegoProxyBuilder )
private
FWCandidateLegoProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )
void FWCandidateLegoProxyBuilder::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  type,
const FWViewContext vc 
)
overridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 56 of file FWCandidateLegoProxyBuilder.cc.

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

58 {
59  for( TEveElement::List_i i = parent->BeginChildren(); i != parent->EndChildren(); ++i )
60  {
61  if( (*i)->HasChildren() )
62  {
63  TEveElement *el = (*i)->FirstChild(); // There is only one child
64  FWLegoCandidate *candidate = dynamic_cast<FWLegoCandidate*> (el);
65  candidate->updateScale( vc, context() );
66  }
67  }
68 }
const fireworks::Context & context() const
int i
Definition: DBlmapReader.cc:9
list parent
Definition: dbtoconf.py:74
void updateScale(const FWViewContext *vc, const fireworks::Context &)