CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
FWProxyBuilderBase Class Reference

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

Inheritance diagram for FWProxyBuilderBase:
FWCaloDataProxyBuilderBase FWCSCStripDigiProxyBuilder FWCSCWireDigiProxyBuilder FWDigitSetProxyBuilder FWDTDigiProxyBuilder FWGEMDigiProxyBuilder FWGEMPadDigiProxyBuilder FWME0DigiProxyBuilder FWPFCandidateWithHitsProxyBuilder FWPhase2TrackerCluster1DDetProxyBuilder FWPhase2TrackerCluster1DProxyBuilder FWProxyBuilderTemplate< T > FWProxyBuilderTemplate< EcalRecHit > FWRPCDigiProxyBuilder FWSimpleProxyBuilder FWSimTrackProxyBuilder FWSiPixelClusterDetProxyBuilder FWSiPixelClusterProxyBuilder FWSiPixelDigiProxyBuilder FWSiStripClusterProxyBuilder FWSiStripDigiProxyBuilder FWTauProxyBuilderBase FWTrackProxyBuilderFullFramework

Classes

struct  Product
 

Public Member Functions

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 &)
 
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 bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Protected Types

typedef std::vector< Product * >::iterator Product_it
 

Protected Member Functions

virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
virtual void clean ()
 
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)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 

Protected Attributes

std::vector< Product * > m_products
 

Private Member Functions

void cleanProduct (Product *p)
 
void setProjectionLayer (float)
 

Private Attributes

bool m_haveWindow
 
FWInteractionListm_interactionList
 
const FWEventItemm_item
 
float m_layer
 
bool m_modelsChanged
 
bool m_mustBuild
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 46 of file FWProxyBuilderBase.h.

Member Typedef Documentation

◆ Product_it

typedef std::vector<Product*>::iterator FWProxyBuilderBase::Product_it
protected

Definition at line 133 of file FWProxyBuilderBase.h.

Constructor & Destructor Documentation

◆ FWProxyBuilderBase() [1/2]

FWProxyBuilderBase::FWProxyBuilderBase ( )

Definition at line 69 of file FWProxyBuilderBase.cc.

70  : m_interactionList(nullptr),
71  m_item(nullptr),
72  m_modelsChanged(false),
73  m_haveWindow(false),
74  m_mustBuild(true),
75  m_layer(0) {}
const FWEventItem * m_item
FWInteractionList * m_interactionList

◆ ~FWProxyBuilderBase()

FWProxyBuilderBase::~FWProxyBuilderBase ( )
virtual

Definition at line 77 of file FWProxyBuilderBase.cc.

References m_products.

77 { m_products.clear(); }
std::vector< Product * > m_products

◆ FWProxyBuilderBase() [2/2]

FWProxyBuilderBase::FWProxyBuilderBase ( const FWProxyBuilderBase )
protected

Member Function Documentation

◆ build() [1/2]

void FWProxyBuilderBase::build ( )

Definition at line 110 of file FWProxyBuilderBase.cc.

Referenced by FWHGCalMultiClusterLegoProxyBuilder::build(), FWCandidateTowerProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWTracksterHitsProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFCandidateTowerProxyBuilder::build(), FWCaloTowerProxyBuilderBase::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWTracksterLayersProxyBuilder::build(), FWHGTowerProxyBuilderBase::build(), FWHFTowerProxyBuilderBase::build(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::build(), itemChanged(), setHaveWindow(), and FWSimpleProxyBuilder::visibilityModelChanges().

110  {
111  if (m_item) {
112  try {
113  size_t itemSize = m_item->size(); //cashed
114 
115  clean();
116  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
117  //printf("build() %s \n", m_item->name().c_str());
118  TEveElementList* elms = (*i)->m_elements;
119  size_t oldSize = elms->NumChildren();
120 
121  if (haveSingleProduct()) {
122  build(m_item, elms, (*i)->m_viewContext);
123  } else {
124  buildViewType(m_item, elms, (*i)->m_viewType, (*i)->m_viewContext);
125  }
126 
127  // Project all children of current product.
128  // If product is not registered into any projection-manager,
129  // this does nothing.
130  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(elms);
131  if (pable->HasProjecteds()) {
132  // loop projected holders
133  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i) {
134  TEveProjectionManager* pmgr = (*i)->GetManager();
135  Float_t oldDepth = pmgr->GetCurrentDepth();
136  pmgr->SetCurrentDepth(item()->layer());
137  size_t cnt = 0;
138 
139  TEveElement* projectedAsElement = (*i)->GetProjectedAsElement();
140  TEveElement::List_i parentIt = projectedAsElement->BeginChildren();
141  for (TEveElement::List_i prodIt = elms->BeginChildren(); prodIt != elms->EndChildren(); ++prodIt, ++cnt) {
142  // reused projected holder
143  if (cnt < oldSize) {
144  if ((*parentIt)->NumChildren()) {
145  // update projected (mislleading name)
146  for (TEveElement::List_i pci = (*parentIt)->BeginChildren(); pci != (*parentIt)->EndChildren(); pci++)
147  pmgr->ProjectChildrenRecurse(*parentIt);
148  } else {
149  // import projectable
150  pmgr->SubImportChildren(*prodIt, *parentIt);
151  }
152 
153  ++parentIt;
154  } else if (cnt < itemSize) {
155  // new product holder
156  pmgr->SubImportElements(*prodIt, projectedAsElement);
157  } else {
158  break;
159  }
160  }
161  pmgr->SetCurrentDepth(oldDepth);
162  }
163  }
164 
165  if (m_interactionList && itemSize > oldSize) {
166  TEveElement::List_i elIt = elms->BeginChildren();
167  for (size_t cnt = 0; cnt < itemSize; ++cnt, ++elIt) {
168  if (cnt >= oldSize)
169  m_interactionList->added(*elIt, cnt);
170  }
171  }
172  }
173  } catch (const std::runtime_error& iException) {
174  fwLog(fwlog::kError) << "Caught exception in build function for item " << m_item->name() << ":\n"
175  << iException.what() << std::endl;
176  exit(1);
177  }
178  }
179  m_mustBuild = false;
180 }
size_t size() const
Definition: FWEventItem.cc:457
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual bool haveSingleProduct() const
const FWEventItem * m_item
void added(TEveElement *, unsigned int)
#define fwLog(_level_)
Definition: fwLog.h:45
const std::string & name() const
Definition: FWEventItem.cc:435
FWInteractionList * m_interactionList
const FWEventItem * item() const
def exit(msg="")

◆ build() [2/2]

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

◆ buildViewType()

void FWProxyBuilderBase::buildViewType ( const FWEventItem iItem,
TEveElementList *  ,
FWViewType::EType  ,
const FWViewContext  
)
protectedvirtual

Reimplemented in FWDTDigiProxyBuilder, FWSimpleProxyBuilder, and FWPFTauProxyBuilder.

Definition at line 333 of file FWProxyBuilderBase.cc.

Referenced by FWSimpleProxyBuilderTemplate< TrajectorySeed >::build().

333  {
334  assert(
335  "virtual buildViewType(const FWEventItem*, TEveElementList*, FWViewType::EType, const FWViewContext*) not "
336  "implemented by inherited class");
337 }
assert(be >=bs)

◆ canHandle()

bool FWProxyBuilderBase::canHandle ( const FWEventItem item)
virtual

Definition at line 230 of file FWProxyBuilderBase.cc.

References item(), m_item, and FWEventItem::purpose().

230  {
231  if (m_item)
232  return (item.purpose() == m_item->purpose());
233 
234  return false;
235 }
const FWEventItem * m_item
const std::string & purpose() const
Definition: FWEventItem.cc:439
const FWEventItem * item() const

◆ clean()

void FWProxyBuilderBase::clean ( )
protectedvirtual

Reimplemented in FWSimpleProxyBuilder.

Definition at line 314 of file FWProxyBuilderBase.cc.

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

Referenced by FWSimpleProxyBuilderTemplate< TrajectorySeed >::build().

314  {
315  // Cleans local common element list.
316  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
317  if ((*i)->m_elements)
318  (*i)->m_elements->DestroyElements();
319  }
320 
321  cleanLocal();
322 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual void cleanLocal()

◆ cleanLocal()

void FWProxyBuilderBase::cleanLocal ( )
protectedvirtual

◆ cleanProduct()

void FWProxyBuilderBase::cleanProduct ( Product p)
private

◆ context()

const fireworks::Context & FWProxyBuilderBase::context ( ) const

Definition at line 412 of file FWProxyBuilderBase.cc.

References FWEventItem::context(), and m_item.

Referenced by FWTauProxyBuilderBase::addConstituentTracks(), fireworks::addDashedLine(), FWPFCandidateWithHitsProxyBuilder::addHitsForCandidate(), FWTauProxyBuilderBase::addLeadTrack(), FWPFCandidateWithHitsProxyBuilder::build(), FWCaloRecHitDigitSetProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWCandidatePtrProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPFPatJet3DProxyBuilder< reco::PFJet >::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWCandidateLegoProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::build(), FWVertexCandidateProxyBuilder::build(), FWVertexProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::buildViewType(), FWMETProxyBuilder::buildViewType(), FWPFBlockProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::buildViewType(), FWVertexProxyBuilder::localModelChanges(), FWVertexCandidateProxyBuilder::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), FWElectronProxyBuilder::requestCommon(), FWJetProxyBuilder::requestCommon(), FWCandidateHGCalLegoProxyBuilder::scaleProduct(), FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), FWPFBlockProxyBuilder::scaleProduct(), FWCaloDataHistProxyBuilder::setCaloData(), FWTrackProxyBuilderFullFramework::setItem(), FWVertexProxyBuilder::setItem(), FWVertexCandidateProxyBuilder::setItem(), FWJetProxyBuilder::setTextPos(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

412 { return m_item->context(); }
const FWEventItem * m_item
const fireworks::Context & context() const
Definition: FWEventItem.h:121

◆ createCompound()

TEveCompound * FWProxyBuilderBase::createCompound ( bool  set_color = true,
bool  propagate_color_to_all_children = false 
) const
protected

Definition at line 374 of file FWProxyBuilderBase.cc.

References c, FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), m_item, set_color(), and FWDisplayProperties::transparency().

Referenced by FWPFCandidateWithHitsProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWGEMPadDigiProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::buildViewType(), and FWDTDigiProxyBuilder::buildViewType().

374  {
375  TEveCompound* c = new TEveCompound();
376  c->CSCTakeAnyParentAsMaster();
377  c->CSCImplySelectAllChildren();
378  c->SetPickable(true);
379  if (set_color) {
380  c->SetMainColor(m_item->defaultDisplayProperties().color());
381  c->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
382  }
383  if (propagate_color_to_all_children) {
384  c->CSCApplyMainColorToAllChildren();
385  c->CSCApplyMainTransparencyToAllChildren();
386  } else {
387  c->CSCApplyMainColorToMatchingChildren();
388  c->CSCApplyMainTransparencyToMatchingChildren();
389  }
390  return c;
391 }
Char_t transparency() const
const FWEventItem * m_item
void set_color(TEveElement *element, Color_t color, float alpha, unsigned int levels)
Definition: eve_macros.cc:154
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403

◆ createProduct()

TEveElementList * FWProxyBuilderBase::createProduct ( FWViewType::EType  viewType,
const FWViewContext viewContext 
)

Definition at line 239 of file FWProxyBuilderBase.cc.

References havePerViewProduct(), haveSingleProduct(), mps_fire::i, item(), FWProxyBuilderBase::Product::m_elements, m_products, FWProxyBuilderBase::Product::m_scaleConnection, Skims_PA_cff::name, scaleChanged(), and FWViewContext::scaleChanged_.

239  {
240  if (havePerViewProduct(viewType) == false && m_products.empty() == false) {
241  if (haveSingleProduct()) {
242  return m_products.back()->m_elements;
243  } else {
244  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
245  if (viewType == (*i)->m_viewType)
246  return (*i)->m_elements;
247  }
248  }
249  }
250 
251  // printf("new product %s for item %s \n", FWViewType::idToName(viewType).c_str(), item()->name().c_str()); fflush(stdout);
252 
253  Product* product = new Product(viewType, viewContext);
254  m_products.push_back(product);
255  if (viewContext) {
256  product->m_scaleConnection =
257  viewContext->scaleChanged_.connect(std::bind(&FWProxyBuilderBase::scaleChanged, this, std::placeholders::_1));
258  }
259 
260  if (item()) {
261  // debug info in eve browser
262  product->m_elements->SetElementName(item()->name().c_str());
263  }
264  return product->m_elements;
265 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
sigc::signal< void(const FWViewContext *)> scaleChanged_
Definition: FWViewContext.h:42
virtual bool haveSingleProduct() const
void scaleChanged(const FWViewContext *)
virtual bool havePerViewProduct(FWViewType::EType) const
const FWEventItem * item() const

◆ getHaveWindow()

bool FWProxyBuilderBase::getHaveWindow ( ) const
inline

Definition at line 95 of file FWProxyBuilderBase.h.

References m_haveWindow.

Referenced by FWEveViewManager::itemChanged(), and FWEveViewManager::modelChanges().

95 { return m_haveWindow; }

◆ havePerViewProduct()

virtual bool FWProxyBuilderBase::havePerViewProduct ( FWViewType::EType  ) const
inlinevirtual

◆ haveSingleProduct()

virtual bool FWProxyBuilderBase::haveSingleProduct ( void  ) const
inlinevirtual

◆ increaseComponentTransparency()

void FWProxyBuilderBase::increaseComponentTransparency ( unsigned int  index,
TEveElement *  holder,
const std::string &  name,
Char_t  transpOffset 
)
protected

Definition at line 393 of file FWProxyBuilderBase.cc.

References FWEventItem::ModelInfo::displayProperties(), item(), visualization-live-secondInstance_cfg::m, oniaPATMuonsWithTrigger_cff::matches, METSkim_cff::Min, FWEventItem::modelInfo(), Skims_PA_cff::name, and FWDisplayProperties::transparency().

Referenced by FWMuonRhoPhiProxyBuilder::build(), FWMuonProxyBuilder::build(), FWSiStripClusterProxyBuilder::localModelChanges(), FWMuonRhoPhiProxyBuilder::localModelChanges(), FWMuonProxyBuilder::localModelChanges(), FWTauProxyBuilderBase::localModelChanges(), FWVertexProxyBuilder::localModelChanges(), FWVertexCandidateProxyBuilder::localModelChanges(), and FWJetProxyBuilder::localModelChanges().

396  {
397  // Helper function to increse transparency of certain components.
398 
399  Char_t transparency = item()->modelInfo(index).displayProperties().transparency();
400  Char_t transp = TMath::Min(100, transpOffset + (100 - transpOffset) * transparency / 100);
401  TEveElement::List_t matches;
402  holder->FindChildren(matches, name.c_str());
403  for (TEveElement::List_i m = matches.begin(); m != matches.end(); ++m) {
404  (*m)->SetMainTransparency(transp);
405  }
406 }
Char_t transparency() const
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
const FWEventItem * item() const

◆ item()

const FWEventItem* FWProxyBuilderBase::item ( ) const
inline

Definition at line 64 of file FWProxyBuilderBase.h.

References m_item.

Referenced by FWDigitSetProxyBuilder::addBoxSetToProduct(), FWCaloDataHistProxyBuilder::assertCaloDataSlice(), FWHGTowerProxyBuilderBase::assertCaloDataSlice(), FWHFTowerProxyBuilderBase::assertCaloDataSlice(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWHGCalMultiClusterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWECaloParticleProxyBuilder::build(), FWME0SegmentProxyBuilder::build(), FWHGCalTriggerCellProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWMuonRhoPhiProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWHGCalTriggerClusterProxyBuilder::build(), FWCaloParticleProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWMuonProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTracksterHitsProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWPFCandidatesLegoProxyBuilder::build(), FWCandidateLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::build(), FWTrackProxyBuilderFullFramework::build(), FWTracksterLayersProxyBuilder::build(), FWCaloDataProxyBuilderBase::build(), FWHGCRecHitProxyBuilder::build(), FWVertexCandidateProxyBuilder::build(), FWVertexProxyBuilder::build(), FWPFEcalClusterRPZProxyBuilder::build(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::build(), FWPFHcalClusterRPZProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWME0RecHitProxyBuilder::buildViewType(), FWGEMSegmentProxyBuilder::buildViewType(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), FWPhotonProxyBuilder::buildViewType(), FWDTSegmentProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), canHandle(), createProduct(), FWHGCalMultiClusterLegoProxyBuilder::fillCaloData(), FWCandidateTowerProxyBuilder::fillCaloData(), FWPFCandidateTowerProxyBuilder::fillCaloData(), FWCaloTowerProxyBuilderBase::fillCaloData(), FWHGTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillCaloData(), FWHGTowerProxyBuilderBase::fillTowerForDetId(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), increaseComponentTransparency(), FWPFCandidateWithHitsProxyBuilder::initPFRecHitsCollections(), FWHGCalMultiClusterLegoProxyBuilder::instantiateSliceSelector(), FWCandidateTowerProxyBuilder::instantiateSliceSelector(), FWPFCandidateTowerProxyBuilder::instantiateSliceSelector(), FWCaloTowerProxyBuilderBase::instantiateSliceSelector(), FWEveViewManager::itemChanged(), FWBeamSpotProxyBuilder::localModelChanges(), FWPhase2TrackerCluster1DProxyBuilder::localModelChanges(), FWCandidateHGCalLegoProxyBuilder::localModelChanges(), FWPFCandidatesLegoProxyBuilder::localModelChanges(), FWCandidateLegoProxyBuilder::localModelChanges(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::localModelChanges(), FWPFClusterLegoProxyBuilder::localModelChanges(), FWPFEcalRecHitLegoProxyBuilder::localModelChanges(), FWVertexProxyBuilder::localModelChanges(), FWVertexCandidateProxyBuilder::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), FWDigitSetProxyBuilder::modelChanges(), FWCaloDataProxyBuilderBase::modelChanges(), FWEveViewManager::modelChanges(), FWProxyBuilderTemplate< EcalRecHit >::modelData(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::modelData(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::modelData(), FWConversionProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), FWJetProxyBuilder::requestCommon(), FWCaloRecHitDigitSetProxyBuilder::scaleProduct(), FWPFCandidateWithHitsProxyBuilder::scaleProduct(), FWTauProxyBuilderBase::scaleProduct(), FWMETProxyBuilder::scaleProduct(), FWJetProxyBuilder::scaleProduct(), FWJetProxyBuilder::setTextPos(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

64 { return m_item; }
const FWEventItem * m_item

◆ itemBeingDestroyed()

void FWProxyBuilderBase::itemBeingDestroyed ( const FWEventItem iItem)
virtual

Reimplemented in FWCaloDataProxyBuilderBase, FWHFTowerProxyBuilderBase, FWHGTowerProxyBuilderBase, FWSiStripClusterProxyBuilder, and FWCaloDataHistProxyBuilder.

Definition at line 97 of file FWProxyBuilderBase.cc.

References cleanLocal(), mps_fire::i, m_item, and m_products.

Referenced by FWSiStripClusterProxyBuilder::itemBeingDestroyed(), and FWCaloDataProxyBuilderBase::itemBeingDestroyed().

97  {
98  m_item = nullptr;
99 
100  cleanLocal();
101 
102  for (Product_it i = m_products.begin(); i != m_products.end(); i++) {
103  (*i)->m_scaleConnection.disconnect();
104  delete (*i);
105  }
106 
107  m_products.clear();
108 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual void cleanLocal()
const FWEventItem * m_item

◆ itemChanged()

void FWProxyBuilderBase::itemChanged ( const FWEventItem iItem)

Definition at line 217 of file FWProxyBuilderBase.cc.

References build(), FWEventItem::layer(), m_haveWindow, m_layer, m_modelsChanged, m_mustBuild, and setProjectionLayer().

Referenced by FWEveViewManager::itemChanged().

217  {
218  if (iItem->layer() != m_layer)
219  setProjectionLayer(iItem->layer());
220 
221  if (m_haveWindow) {
222  build();
223  } else {
224  m_mustBuild = true;
225  }
226  m_modelsChanged = false;
227 }
int layer() const
Definition: FWEventItem.cc:405
void setProjectionLayer(float)

◆ layer()

int FWProxyBuilderBase::layer ( ) const

◆ localModelChanges()

void FWProxyBuilderBase::localModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
protectedvirtual

◆ modelChanges() [1/2]

void FWProxyBuilderBase::modelChanges ( const FWModelIds iIds)

Definition at line 205 of file FWProxyBuilderBase.cc.

References mps_fire::i, m_haveWindow, m_modelsChanged, and m_products.

Referenced by FWEveViewManager::modelChanges().

205  {
206  if (m_haveWindow) {
207  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
208  modelChanges(iIds, *i);
209  }
210  m_modelsChanged = false;
211  } else {
212  m_modelsChanged = true;
213  }
214 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
void modelChanges(const FWModelIds &)

◆ modelChanges() [2/2]

void FWProxyBuilderBase::modelChanges ( const FWModelIds iIds,
Product p 
)
protectedvirtual

Reimplemented in FWCaloDataProxyBuilderBase, and FWDigitSetProxyBuilder.

Definition at line 183 of file FWProxyBuilderBase.cc.

References cms::cuda::assert(), localModelChanges(), m_item, AlCaHLTBitMon_ParallelJobs::p, FWEventItem::size(), and visibilityModelChanges().

183  {
184  TEveElementList* elms = p->m_elements;
185  assert(m_item && static_cast<int>(m_item->size()) <= elms->NumChildren() &&
186  "can not use default modelChanges implementation");
187 
188  TEveElement::List_i itElement = elms->BeginChildren();
189  int index = 0;
190  for (FWModelIds::const_iterator it = iIds.begin(), itEnd = iIds.end(); it != itEnd; ++it, ++itElement, ++index) {
191  assert(itElement != elms->EndChildren());
192  while (index < it->index()) {
193  ++itElement;
194  ++index;
195  assert(itElement != elms->EndChildren());
196  }
197  if (visibilityModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext)) {
198  elms->ProjectChild(*itElement);
199  } else {
200  localModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext);
201  }
202  }
203 }
size_t size() const
Definition: FWEventItem.cc:457
virtual bool visibilityModelChanges(const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
assert(be >=bs)
const FWEventItem * m_item
virtual void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)

◆ operator=()

const FWProxyBuilderBase& FWProxyBuilderBase::operator= ( const FWProxyBuilderBase )
protected

◆ removePerViewProduct()

void FWProxyBuilderBase::removePerViewProduct ( FWViewType::EType  type,
const FWViewContext vc 
)

Definition at line 269 of file FWProxyBuilderBase.cc.

References havePerViewProduct(), mps_fire::i, and m_products.

269  {
270  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
271  if (havePerViewProduct(type) && (*i)->m_viewContext == vc) {
272  if ((*i)->m_elements)
273  (*i)->m_elements->DestroyElements();
274 
275  if ((*i)->m_viewContext)
276  (*i)->m_scaleConnection.disconnect();
277 
278  delete (*i);
279  m_products.erase(i);
280  break;
281  }
282  }
283 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual bool havePerViewProduct(FWViewType::EType) const

◆ representsSubPart()

bool FWProxyBuilderBase::representsSubPart ( void  )
static

Used by the plugin system to determine precidence of different proxy builders for same type this returns 'true' if the proxy builder is specialized to only show a sub-part of the object as opposed to showing the object as a whole

Definition at line 422 of file FWProxyBuilderBase.cc.

422 { return false; }

◆ scaleChanged()

void FWProxyBuilderBase::scaleChanged ( const FWViewContext vc)

Definition at line 305 of file FWProxyBuilderBase.cc.

References havePerViewProduct(), mps_fire::i, m_products, and scaleProduct().

Referenced by createProduct().

305  {
306  for (Product_it i = m_products.begin(); i != m_products.end(); ++i) {
307  if (havePerViewProduct((*i)->m_viewType) && (*i)->m_viewContext == vc) {
308  scaleProduct((*i)->m_elements, (*i)->m_viewType, (*i)->m_viewContext);
309  }
310  }
311  gEve->Redraw3D();
312 }
virtual void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual bool havePerViewProduct(FWViewType::EType) const

◆ scaleProduct()

virtual void FWProxyBuilderBase::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  ,
const FWViewContext vc 
)
inlineprotectedvirtual

◆ setHaveWindow()

void FWProxyBuilderBase::setHaveWindow ( bool  iFlag)

Definition at line 85 of file FWProxyBuilderBase.cc.

References build(), m_haveWindow, and m_mustBuild.

85  {
86  bool oldValue = m_haveWindow;
87  m_haveWindow = iFlag;
88 
89  if (iFlag && !oldValue) {
90  //this is our first view so may need to rerun our building
91  if (m_mustBuild) {
92  build();
93  }
94  }
95 }

◆ setInteractionList()

void FWProxyBuilderBase::setInteractionList ( FWInteractionList l,
const std::string &   
)
virtual

Definition at line 287 of file FWProxyBuilderBase.cc.

References MainPageGenerator::l, and m_interactionList.

287  {
288  // Called if willHandleInteraction() returns false. Purpose ignored by default.
289 
291 }
FWInteractionList * m_interactionList

◆ setItem()

void FWProxyBuilderBase::setItem ( const FWEventItem iItem)
virtual

Reimplemented in FWHeatmapProxyBuilderTemplate< T >, FWHeatmapProxyBuilderTemplate< CaloParticle >, FWHeatmapProxyBuilderTemplate< ticl::Trackster >, FWHeatmapProxyBuilderTemplate< reco::HGCalMultiCluster >, FWHeatmapProxyBuilderTemplate< reco::CaloCluster >, FWJetProxyBuilder, FWElectronProxyBuilder, FWTauProxyBuilderBase, FWHGCRecHitProxyBuilder, FWTracksterLayersProxyBuilder, FWVertexCandidateProxyBuilder, FWVertexProxyBuilder, FWTracksterHitsProxyBuilder, FWTrackProxyBuilderFullFramework, FWTrackProxyBuilder, FWCaloClusterProxyBuilder, FWCandidateProxyBuilder, FWMuonProxyBuilder, FWTrackingParticleProxyBuilder, FWMuonRhoPhiProxyBuilder, FWGenParticleLegoProxyBuilder, FWCaloRecHitDigitSetProxyBuilder, FWL1THGCalProxyTemplate< T >, FWL1THGCalProxyTemplate< l1t::HGCalTriggerCell >, and FWL1THGCalProxyTemplate< l1t::HGCalMulticluster >.

Definition at line 83 of file FWProxyBuilderBase.cc.

References m_item.

Referenced by FWCaloRecHitDigitSetProxyBuilder::setItem(), FWL1THGCalProxyTemplate< l1t::HGCalMulticluster >::setItem(), FWGenParticleLegoProxyBuilder::setItem(), FWMuonRhoPhiProxyBuilder::setItem(), FWMuonProxyBuilder::setItem(), FWTrackingParticleProxyBuilder::setItem(), FWCandidateProxyBuilder::setItem(), FWTrackProxyBuilder::setItem(), FWTrackProxyBuilderFullFramework::setItem(), FWVertexProxyBuilder::setItem(), FWVertexCandidateProxyBuilder::setItem(), FWHGCRecHitProxyBuilder::setItem(), FWTauProxyBuilderBase::setItem(), FWElectronProxyBuilder::setItem(), FWJetProxyBuilder::setItem(), and FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::setItem().

83 { m_item = iItem; }
const FWEventItem * m_item

◆ setProjectionLayer()

void FWProxyBuilderBase::setProjectionLayer ( float  layer)
private

Definition at line 339 of file FWProxyBuilderBase.cc.

References mps_fire::i, layer(), m_layer, and m_products.

Referenced by itemChanged().

339  {
340  m_layer = layer;
341  for (Product_it pIt = m_products.begin(); pIt != m_products.end(); ++pIt) {
342  TEveProjectable* pable = static_cast<TEveProjectable*>((*pIt)->m_elements);
343  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
344  (*i)->SetDepth(m_layer);
345  }
346 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products

◆ setupAddElement()

void FWProxyBuilderBase::setupAddElement ( TEveElement *  el,
TEveElement *  parent,
bool  set_color = true 
) const

Definition at line 350 of file FWProxyBuilderBase.cc.

References class-composition::parent, and setupElement().

Referenced by fireworks::addBox(), fireworks::addCircle(), FWTauProxyBuilderBase::addConstituentTracks(), fireworks::addDashedArrow(), fireworks::addDashedLine(), fireworks::addDoubleLines(), FWPFCandidateWithHitsProxyBuilder::addHitsForCandidate(), FWTauProxyBuilderBase::addLeadTrack(), fireworks::addRhoZEnergyProjection(), FWPFCandidateWithHitsProxyBuilder::build(), FWTracksterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWME0SegmentProxyBuilder::build(), FWPhase2TrackerCluster1DDetProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWPhotonLegoProxyBuilder::build(), FWMuonGlimpseProxyBuilder::build(), FWSimVertexProxyBuilder::build(), FWMuonLegoProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWTrackingVertexProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWPFTrackRPZProxyBuilder::build(), FWBeamSpotOnlineProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWPFTrack3DProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWCandidatePtrProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWPFTrackLegoProxyBuilder::build(), FWTracksterHitsProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFPatJet3DProxyBuilder< reco::PFJet >::build(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::build(), FWCandidateLegoProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWTracksterLayersProxyBuilder::build(), FWVertexCandidateProxyBuilder::build(), FWVertexProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWGEMPadDigiProxyBuilder::build(), FWElectronGlimpseProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWPFRhoPhiRecHit::buildRecHit(), FWTrackProxyBuilderFullFramework::buildTrack(), FWME0RecHitProxyBuilder::buildViewType(), FWGEMSegmentProxyBuilder::buildViewType(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), FWPhotonProxyBuilder::buildViewType(), FWPFTauProxyBuilder::buildViewType(), FWDTSegmentProxyBuilder::buildViewType(), FWElectronProxyBuilder::buildViewType(), FWConversionProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWPFLegoRecHit::FWPFLegoRecHit(), fireworks::makeRhoPhiSuperCluster(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFBlockProxyBuilder::setupTrackElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

350  {
351  setupElement(el, color);
352  parent->AddElement(el);
353 }
void setupElement(TEveElement *el, bool color=true) const

◆ setupElement()

void FWProxyBuilderBase::setupElement ( TEveElement *  el,
bool  color = true 
) const

This method is invoked to setup the per element properties of the various objects being drawn.

Definition at line 358 of file FWProxyBuilderBase.cc.

References cms::cuda::assert(), FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), m_item, and FWDisplayProperties::transparency().

Referenced by FWConversionProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), and setupAddElement().

358  {
359  el->CSCTakeAnyParentAsMaster();
360  el->SetPickable(true);
361 
362  if (color) {
363  el->CSCApplyMainColorToMatchingChildren();
364  el->CSCApplyMainTransparencyToMatchingChildren();
365  el->SetMainColor(m_item->defaultDisplayProperties().color());
368  el->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
369  }
370 }
Char_t transparency() const
assert(be >=bs)
const FWEventItem * m_item
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403

◆ typeOfBuilder()

std::string FWProxyBuilderBase::typeOfBuilder ( )
static

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

Definition at line 420 of file FWProxyBuilderBase.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

◆ visibilityModelChanges()

bool FWProxyBuilderBase::visibilityModelChanges ( const FWModelId ,
TEveElement *  ,
FWViewType::EType  ,
const FWViewContext  
)
protectedvirtual

Reimplemented in FWSimpleProxyBuilder, and FWTrackProxyBuilderFullFramework.

Definition at line 293 of file FWProxyBuilderBase.cc.

Referenced by modelChanges().

296  {
297  return false;
298 }

◆ willHandleInteraction()

virtual bool FWProxyBuilderBase::willHandleInteraction ( ) const
inlinevirtual

Reimplemented in FWCaloDataProxyBuilderBase, and FWDigitSetProxyBuilder.

Definition at line 90 of file FWProxyBuilderBase.h.

90 { return false; }

Member Data Documentation

◆ m_haveWindow

bool FWProxyBuilderBase::m_haveWindow
private

Definition at line 148 of file FWProxyBuilderBase.h.

Referenced by getHaveWindow(), itemChanged(), modelChanges(), and setHaveWindow().

◆ m_interactionList

FWInteractionList* FWProxyBuilderBase::m_interactionList
private

◆ m_item

const FWEventItem* FWProxyBuilderBase::m_item
private

◆ m_layer

float FWProxyBuilderBase::m_layer
private

Definition at line 151 of file FWProxyBuilderBase.h.

Referenced by itemChanged(), and setProjectionLayer().

◆ m_modelsChanged

bool FWProxyBuilderBase::m_modelsChanged
private

Definition at line 147 of file FWProxyBuilderBase.h.

Referenced by itemChanged(), and modelChanges().

◆ m_mustBuild

bool FWProxyBuilderBase::m_mustBuild
private

◆ m_products

std::vector<Product*> FWProxyBuilderBase::m_products
protected