CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
FWSimpleProxyBuilder Class Referenceabstract

#include <Fireworks/Core/interface/FWSimpleProxyBuilder.h>

Inheritance diagram for FWSimpleProxyBuilder:
FWProxyBuilderBase FWSimpleProxyBuilderTemplate< T > FWSimpleProxyBuilderTemplate< BeamSpotOnline > FWSimpleProxyBuilderTemplate< CSCRecHit2D > FWSimpleProxyBuilderTemplate< CSCSegment > FWSimpleProxyBuilderTemplate< DTRecHit1DPair > FWSimpleProxyBuilderTemplate< DTRecSegment4D > FWSimpleProxyBuilderTemplate< l1extra::L1EmParticle > FWSimpleProxyBuilderTemplate< l1extra::L1EtMissParticle > FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle > FWSimpleProxyBuilderTemplate< l1extra::L1MuonParticle > FWSimpleProxyBuilderTemplate< pat::Jet > FWSimpleProxyBuilderTemplate< PSimHit > FWSimpleProxyBuilderTemplate< reco::BeamSpot > FWSimpleProxyBuilderTemplate< reco::CaloCluster > FWSimpleProxyBuilderTemplate< reco::Candidate > FWSimpleProxyBuilderTemplate< reco::Conversion > FWSimpleProxyBuilderTemplate< reco::GenParticle > FWSimpleProxyBuilderTemplate< reco::GsfElectron > FWSimpleProxyBuilderTemplate< reco::Jet > FWSimpleProxyBuilderTemplate< reco::MET > FWSimpleProxyBuilderTemplate< reco::Muon > FWSimpleProxyBuilderTemplate< reco::PFBlock > FWSimpleProxyBuilderTemplate< reco::PFCandidate > FWSimpleProxyBuilderTemplate< reco::PFCluster > FWSimpleProxyBuilderTemplate< reco::PFJet > FWSimpleProxyBuilderTemplate< reco::Photon > FWSimpleProxyBuilderTemplate< reco::SecondaryVertexTagInfo > FWSimpleProxyBuilderTemplate< reco::Track > FWSimpleProxyBuilderTemplate< reco::Vertex > FWSimpleProxyBuilderTemplate< RPCRecHit > FWSimpleProxyBuilderTemplate< SimVertex > FWSimpleProxyBuilderTemplate< SiStripCluster > FWSimpleProxyBuilderTemplate< TrackingParticle > FWSimpleProxyBuilderTemplate< TrackingVertex >

Public Member Functions

 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 havePerViewProduct (FWViewType::EType) 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 &)
 
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 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 Member Functions

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

FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Private Member Functions

virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)
 
virtual void itemChangedImp (const FWEventItem *)
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage:s <usage>

Definition at line 31 of file FWSimpleProxyBuilder.h.

Constructor & Destructor Documentation

FWSimpleProxyBuilder::FWSimpleProxyBuilder ( const std::type_info &  iType)

Definition at line 33 of file FWSimpleProxyBuilder.cc.

33  :
34  m_helper(iType)
35 {
36 }
FWSimpleProxyHelper m_helper
FWSimpleProxyBuilder::~FWSimpleProxyBuilder ( )
virtual

Definition at line 43 of file FWSimpleProxyBuilder.cc.

44 {
45 }
FWSimpleProxyBuilder::FWSimpleProxyBuilder ( const FWSimpleProxyBuilder )
private

Member Function Documentation

void FWSimpleProxyBuilder::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext vc 
)
protectedvirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 89 of file FWSimpleProxyBuilder.cc.

References FWProxyBuilderBase::build(), FWProxyBuilderBase::createCompound(), FWEventItem::ModelInfo::displayProperties(), getHLTprescales::index, FWDisplayProperties::isVisible(), m_helper, FWEventItem::modelData(), FWEventItem::modelInfo(), FWSimpleProxyHelper::offsetObject(), FWEventItem::size(), and findQualityFiles::size.

91 {
92  size_t size = iItem->size();
93  TEveElement::List_i pIdx = product->BeginChildren();
94  for (int index = 0; index < static_cast<int>(size); ++index)
95  {
96  TEveElement* itemHolder = 0;
97  if (index < product->NumChildren())
98  {
99  itemHolder = *pIdx;
100  itemHolder->SetRnrSelfChildren(true, true);
101  ++pIdx;
102  }
103  else
104  {
105  itemHolder = createCompound();
106  product->AddElement(itemHolder);
107  }
108  if (iItem->modelInfo(index).displayProperties().isVisible())
109  {
110  const void* modelData = iItem->modelData(index);
111  build(m_helper.offsetObject(modelData),index, *itemHolder, vc);
112  }
113  }
114 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:67
const void * offsetObject(const void *iObj) const
FWSimpleProxyHelper m_helper
size_t size() const
Definition: FWEventItem.cc:548
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:567
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
tuple size
Write out results.
virtual void FWSimpleProxyBuilder::build ( const void *  ,
unsigned int  iIndex,
TEveElement &  iItemHolder,
const FWViewContext  
)
privatepure virtual

Implemented in FWSimpleProxyBuilderTemplate< T >, FWSimpleProxyBuilderTemplate< DTRecHit1DPair >, FWSimpleProxyBuilderTemplate< reco::PFBlock >, FWSimpleProxyBuilderTemplate< pat::Jet >, FWSimpleProxyBuilderTemplate< reco::Jet >, FWSimpleProxyBuilderTemplate< PSimHit >, FWSimpleProxyBuilderTemplate< TrackingVertex >, FWSimpleProxyBuilderTemplate< CSCSegment >, FWSimpleProxyBuilderTemplate< CSCRecHit2D >, FWSimpleProxyBuilderTemplate< reco::PFCluster >, FWSimpleProxyBuilderTemplate< reco::PFCandidate >, FWSimpleProxyBuilderTemplate< reco::GenParticle >, FWSimpleProxyBuilderTemplate< SiStripCluster >, FWSimpleProxyBuilderTemplate< SimVertex >, FWSimpleProxyBuilderTemplate< reco::Track >, FWSimpleProxyBuilderTemplate< l1extra::L1EmParticle >, FWSimpleProxyBuilderTemplate< l1extra::L1EtMissParticle >, FWSimpleProxyBuilderTemplate< l1extra::L1MuonParticle >, FWSimpleProxyBuilderTemplate< BeamSpotOnline >, FWSimpleProxyBuilderTemplate< TrackingParticle >, FWSimpleProxyBuilderTemplate< reco::MET >, FWSimpleProxyBuilderTemplate< reco::Photon >, FWSimpleProxyBuilderTemplate< reco::Candidate >, FWSimpleProxyBuilderTemplate< reco::Vertex >, FWSimpleProxyBuilderTemplate< DTRecSegment4D >, FWSimpleProxyBuilderTemplate< reco::SecondaryVertexTagInfo >, FWSimpleProxyBuilderTemplate< reco::Conversion >, FWSimpleProxyBuilderTemplate< reco::BeamSpot >, FWSimpleProxyBuilderTemplate< reco::GsfElectron >, FWSimpleProxyBuilderTemplate< RPCRecHit >, FWSimpleProxyBuilderTemplate< reco::CaloCluster >, FWSimpleProxyBuilderTemplate< reco::PFJet >, FWSimpleProxyBuilderTemplate< reco::Muon >, and FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >.

void FWSimpleProxyBuilder::buildViewType ( const FWEventItem iItem,
TEveElementList *  product,
FWViewType::EType  viewType,
const FWViewContext vc 
)
protectedvirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 117 of file FWSimpleProxyBuilder.cc.

References FWProxyBuilderBase::createCompound(), FWEventItem::ModelInfo::displayProperties(), getHLTprescales::index, FWDisplayProperties::isVisible(), m_helper, FWEventItem::modelData(), FWEventItem::modelInfo(), FWSimpleProxyHelper::offsetObject(), FWEventItem::size(), and findQualityFiles::size.

Referenced by visibilityModelChanges().

119 {
120  size_t size = iItem->size();
121  TEveElement::List_i pIdx = product->BeginChildren();
122  for (int index = 0; index < static_cast<int>(size); ++index)
123  {
124  TEveElement* itemHolder = 0;
125  if (index < product->NumChildren())
126  {
127  itemHolder = *pIdx;
128  itemHolder->SetRnrSelfChildren(true, true);
129  ++pIdx;
130  }
131  else
132  {
133  itemHolder = createCompound();
134  product->AddElement(itemHolder);
135  }
136  if (iItem->modelInfo(index).displayProperties().isVisible())
137  {
138  const void* modelData = iItem->modelData(index);
139  buildViewType(m_helper.offsetObject(modelData),index, *itemHolder, viewType, vc);
140  }
141  }
142 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:67
const void * offsetObject(const void *iObj) const
FWSimpleProxyHelper m_helper
size_t size() const
Definition: FWEventItem.cc:548
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:567
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
tuple size
Write out results.
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
virtual void FWSimpleProxyBuilder::buildViewType ( const void *  ,
unsigned int  iIndex,
TEveElement &  iItemHolder,
FWViewType::EType  ,
const FWViewContext  
)
privatepure virtual

Implemented in FWSimpleProxyBuilderTemplate< T >, FWSimpleProxyBuilderTemplate< DTRecHit1DPair >, FWSimpleProxyBuilderTemplate< reco::PFBlock >, FWSimpleProxyBuilderTemplate< pat::Jet >, FWSimpleProxyBuilderTemplate< reco::Jet >, FWSimpleProxyBuilderTemplate< PSimHit >, FWSimpleProxyBuilderTemplate< TrackingVertex >, FWSimpleProxyBuilderTemplate< CSCSegment >, FWSimpleProxyBuilderTemplate< CSCRecHit2D >, FWSimpleProxyBuilderTemplate< reco::PFCluster >, FWSimpleProxyBuilderTemplate< reco::PFCandidate >, FWSimpleProxyBuilderTemplate< reco::GenParticle >, FWSimpleProxyBuilderTemplate< SiStripCluster >, FWSimpleProxyBuilderTemplate< SimVertex >, FWSimpleProxyBuilderTemplate< reco::Track >, FWSimpleProxyBuilderTemplate< l1extra::L1EmParticle >, FWSimpleProxyBuilderTemplate< l1extra::L1EtMissParticle >, FWSimpleProxyBuilderTemplate< l1extra::L1MuonParticle >, FWSimpleProxyBuilderTemplate< BeamSpotOnline >, FWSimpleProxyBuilderTemplate< TrackingParticle >, FWSimpleProxyBuilderTemplate< reco::MET >, FWSimpleProxyBuilderTemplate< reco::Photon >, FWSimpleProxyBuilderTemplate< reco::Candidate >, FWSimpleProxyBuilderTemplate< reco::Vertex >, FWSimpleProxyBuilderTemplate< DTRecSegment4D >, FWSimpleProxyBuilderTemplate< reco::SecondaryVertexTagInfo >, FWSimpleProxyBuilderTemplate< reco::Conversion >, FWSimpleProxyBuilderTemplate< reco::BeamSpot >, FWSimpleProxyBuilderTemplate< reco::GsfElectron >, FWSimpleProxyBuilderTemplate< RPCRecHit >, FWSimpleProxyBuilderTemplate< reco::CaloCluster >, FWSimpleProxyBuilderTemplate< reco::PFJet >, FWSimpleProxyBuilderTemplate< reco::Muon >, and FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >.

void FWSimpleProxyBuilder::clean ( )
protectedvirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 64 of file FWSimpleProxyBuilder.cc.

References FWProxyBuilderBase::cleanLocal(), i, and FWProxyBuilderBase::m_products.

65 {
66  for (Product_it i = m_products.begin(); i != m_products.end(); ++i)
67  {
68  if ((*i)->m_elements)
69  {
70  TEveElement* elms = (*i)->m_elements;
71  for (TEveElement::List_i it = elms->BeginChildren(); it != elms->EndChildren(); ++it)
72  (*it)->DestroyElements();
73  }
74  }
75 
76  cleanLocal();
77 }
int i
Definition: DBlmapReader.cc:9
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual void cleanLocal()
void FWSimpleProxyBuilder::itemChangedImp ( const FWEventItem iItem)
privatevirtual

Definition at line 80 of file FWSimpleProxyBuilder.cc.

References FWSimpleProxyHelper::itemChanged(), and m_helper.

81 {
82  if (iItem)
83  {
84  m_helper.itemChanged(iItem);
85  }
86 }
FWSimpleProxyHelper m_helper
void itemChanged(const FWEventItem *)
const FWSimpleProxyBuilder& FWSimpleProxyBuilder::operator= ( const FWSimpleProxyBuilder )
private
std::string FWSimpleProxyBuilder::typeOfBuilder ( )
static

Used by the plugin system to determine how the proxy uses the data from FWEventItem.

Definition at line 173 of file FWSimpleProxyBuilder.cc.

174 {
175  return std::string("simple#");
176 }
bool FWSimpleProxyBuilder::visibilityModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
privatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 146 of file FWSimpleProxyBuilder.cc.

References FWProxyBuilderBase::build(), buildViewType(), FWEventItem::ModelInfo::displayProperties(), FWProxyBuilderBase::haveSingleProduct(), FWModelId::index(), info, FWDisplayProperties::isVisible(), FWModelId::item(), m_helper, FWEventItem::modelData(), FWEventItem::modelInfo(), and FWSimpleProxyHelper::offsetObject().

148 {
149  const FWEventItem::ModelInfo& info = iId.item()->modelInfo(iId.index());
150  bool returnValue = false;
151  if (info.displayProperties().isVisible() && iCompound->NumChildren()==0)
152  {
153  const void* modelData = iId.item()->modelData(iId.index());
154  if (haveSingleProduct())
155  build(m_helper.offsetObject(modelData),iId.index(),*iCompound, vc);
156  else
157  buildViewType(m_helper.offsetObject(modelData),iId.index(),*iCompound, viewType, vc);
158  returnValue=true;
159  }
160  return returnValue;
161 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:67
const void * offsetObject(const void *iObj) const
int index() const
Definition: FWModelId.h:50
FWSimpleProxyHelper m_helper
virtual bool haveSingleProduct() const
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:567
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
const FWEventItem * item() const
Definition: FWModelId.h:45
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)

Member Data Documentation

FWSimpleProxyHelper FWSimpleProxyBuilder::m_helper
protected