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) {}

◆ ~FWProxyBuilderBase()

FWProxyBuilderBase::~FWProxyBuilderBase ( )
virtual

Definition at line 77 of file FWProxyBuilderBase.cc.

77 { m_products.clear(); }

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

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 }

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

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

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

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

◆ canHandle()

bool FWProxyBuilderBase::canHandle ( const FWEventItem item)
virtual

Definition at line 230 of file FWProxyBuilderBase.cc.

230  {
231  if (m_item)
232  return (item.purpose() == m_item->purpose());
233 
234  return false;
235 }

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

◆ clean()

void FWProxyBuilderBase::clean ( )
protectedvirtual

Reimplemented in FWSimpleProxyBuilder.

Definition at line 314 of file FWProxyBuilderBase.cc.

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 }

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

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

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

412 { return m_item->context(); }

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().

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

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 }

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

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

◆ createProduct()

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

Definition at line 239 of file FWProxyBuilderBase.cc.

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 }

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

◆ getHaveWindow()

bool FWProxyBuilderBase::getHaveWindow ( ) const
inline

Definition at line 95 of file FWProxyBuilderBase.h.

95 { return m_haveWindow; }

References m_haveWindow.

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

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

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);
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 }

References FWEventItem::ModelInfo::displayProperties(), item(), visualization-live-secondInstance_cfg::m, patCandidatesForDimuonsSequences_cff::matches, 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().

◆ item()

const FWEventItem* FWProxyBuilderBase::item ( ) const
inline

Definition at line 64 of file FWProxyBuilderBase.h.

64 { return m_item; }

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(), FWTracksModulesProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWHGCalTriggerClusterProxyBuilder::build(), FWMuonRhoPhiProxyBuilder::build(), FWCaloParticleProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWMuonProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWCandidateProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::build(), FWTrackProxyBuilderFullFramework::build(), FWCandidateLegoProxyBuilder::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(), FWHFTowerProxyBuilderBase::fillCaloData(), FWHGTowerProxyBuilderBase::fillCaloData(), FWHGTowerProxyBuilderBase::fillTowerForDetId(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), increaseComponentTransparency(), FWPFCandidateWithHitsProxyBuilder::initPFRecHitsCollections(), FWHGCalMultiClusterLegoProxyBuilder::instantiateSliceSelector(), FWCandidateTowerProxyBuilder::instantiateSliceSelector(), FWPFCandidateTowerProxyBuilder::instantiateSliceSelector(), FWCaloTowerProxyBuilderBase::instantiateSliceSelector(), FWEveViewManager::itemChanged(), FWBeamSpotProxyBuilder::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(), FWJetProxyBuilder::setTextPos(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

◆ itemBeingDestroyed()

void FWProxyBuilderBase::itemBeingDestroyed ( const FWEventItem iItem)
virtual

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

Definition at line 97 of file FWProxyBuilderBase.cc.

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 }

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

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

◆ itemChanged()

void FWProxyBuilderBase::itemChanged ( const FWEventItem iItem)

Definition at line 217 of file FWProxyBuilderBase.cc.

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 }

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

Referenced by FWEveViewManager::itemChanged().

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

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 }

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

Referenced by FWEveViewManager::modelChanges().

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

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 }

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

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

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 }

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

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

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 }

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

Referenced by createProduct().

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

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 }

References build(), m_haveWindow, and m_mustBuild.

◆ setInteractionList()

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

Definition at line 287 of file FWProxyBuilderBase.cc.

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

References cmsLHEtoEOSManager::l, and m_interactionList.

◆ setItem()

void FWProxyBuilderBase::setItem ( const FWEventItem iItem)
virtual

◆ setProjectionLayer()

void FWProxyBuilderBase::setProjectionLayer ( float  layer)
private

Definition at line 339 of file FWProxyBuilderBase.cc.

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 }

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

Referenced by itemChanged().

◆ setupAddElement()

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

Definition at line 350 of file FWProxyBuilderBase.cc.

350  {
351  setupElement(el, color);
352  parent->AddElement(el);
353 }

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(), FWTrackTrackingRecHitProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWME0SegmentProxyBuilder::build(), FWPhase2TrackerCluster1DDetProxyBuilder::build(), FWPhotonLegoProxyBuilder::build(), FWMuonGlimpseProxyBuilder::build(), FWSimVertexProxyBuilder::build(), FWMuonLegoProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWTrackingVertexProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWBeamSpotOnlineProxyBuilder::build(), FWPFTrackRPZProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWPFTrack3DProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCandidatePtrProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWPFTrackLegoProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFCandidate3DProxyBuilder::build(), FWPFPatJet3DProxyBuilder< reco::PFJet >::build(), FWCandidateLegoProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::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().

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

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 }

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

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

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

420 { return std::string(); }

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.

296  {
297  return false;
298 }

Referenced by modelChanges().

◆ 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
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
FWProxyBuilderBase::havePerViewProduct
virtual bool havePerViewProduct(FWViewType::EType) const
Definition: FWProxyBuilderBase.h:89
mps_fire.i
i
Definition: mps_fire.py:428
set_color
void set_color(TEveElement *element, Color_t color, float alpha, unsigned int levels)
Definition: eve_macros.cc:154
FWProxyBuilderBase::setupElement
void setupElement(TEveElement *el, bool color=true) const
Definition: FWProxyBuilderBase.cc:358
FWProxyBuilderBase::m_item
const FWEventItem * m_item
Definition: FWProxyBuilderBase.h:145
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FWProxyBuilderBase::setProjectionLayer
void setProjectionLayer(float)
Definition: FWProxyBuilderBase.cc:339
FWProxyBuilderBase::m_layer
float m_layer
Definition: FWProxyBuilderBase.h:151
cms::cuda::assert
assert(be >=bs)
FWDisplayProperties::color
Color_t color() const
Definition: FWDisplayProperties.h:47
FWEventItem::defaultDisplayProperties
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
FWProxyBuilderBase::layer
int layer() const
Definition: FWProxyBuilderBase.cc:414
FWProxyBuilderBase::m_mustBuild
bool m_mustBuild
Definition: FWProxyBuilderBase.h:149
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
FWEventItem::context
const fireworks::Context & context() const
Definition: FWEventItem.h:121
FWProxyBuilderBase::buildViewType
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
Definition: FWProxyBuilderBase.cc:333
FWDisplayProperties::transparency
Char_t transparency() const
Definition: FWDisplayProperties.h:49
FWProxyBuilderBase::scaleChanged
void scaleChanged(const FWViewContext *)
Definition: FWProxyBuilderBase.cc:305
FWProxyBuilderBase::scaleProduct
virtual void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
Definition: FWProxyBuilderBase.h:113
FWInteractionList::added
void added(TEveElement *, unsigned int)
Definition: FWInteractionList.cc:63
FWProxyBuilderBase::clean
virtual void clean()
Definition: FWProxyBuilderBase.cc:314
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
List_t
std::list< Particle > List_t
Definition: Particle.h:174
FWProxyBuilderBase::localModelChanges
virtual void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
Definition: FWProxyBuilderBase.cc:300
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FWProxyBuilderBase::visibilityModelChanges
virtual bool visibilityModelChanges(const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
Definition: FWProxyBuilderBase.cc:293
FWProxyBuilderBase::Product_it
std::vector< Product * >::iterator Product_it
Definition: FWProxyBuilderBase.h:133
FWEventItem::layer
int layer() const
Definition: FWEventItem.cc:405
FWProxyBuilderBase::m_interactionList
FWInteractionList * m_interactionList
Definition: FWProxyBuilderBase.h:143
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem::purpose
const std::string & purpose() const
Definition: FWEventItem.cc:439
FWEventItem::ModelInfo::displayProperties
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWProxyBuilderBase::cleanLocal
virtual void cleanLocal()
Definition: FWProxyBuilderBase.cc:324
FWProxyBuilderBase::modelChanges
void modelChanges(const FWModelIds &)
Definition: FWProxyBuilderBase.cc:205
FWProxyBuilderBase::m_haveWindow
bool m_haveWindow
Definition: FWProxyBuilderBase.h:148
FWProxyBuilderBase::m_modelsChanged
bool m_modelsChanged
Definition: FWProxyBuilderBase.h:147
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
patCandidatesForDimuonsSequences_cff.matches
matches
Definition: patCandidatesForDimuonsSequences_cff.py:131
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
fwlog::kError
Definition: fwLog.h:35
FWProxyBuilderBase::haveSingleProduct
virtual bool haveSingleProduct() const
Definition: FWProxyBuilderBase.h:88
FWEventItem::name
const std::string & name() const
Definition: FWEventItem.cc:435
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
Min
T Min(T a, T b)
Definition: MathUtil.h:39
FWViewContext::scaleChanged_
sigc::signal< void, const FWViewContext * > scaleChanged_
Definition: FWViewContext.h:42
FWProxyBuilderBase::m_products
std::vector< Product * > m_products
Definition: FWProxyBuilderBase.h:135
class-composition.parent
parent
Definition: class-composition.py:88
FWEventItem::size
size_t size() const
Definition: FWEventItem.cc:457