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

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

Definition at line 137 of file FWProxyBuilderBase.h.

Constructor & Destructor Documentation

FWProxyBuilderBase::FWProxyBuilderBase ( )

Definition at line 74 of file FWProxyBuilderBase.cc.

74  :
75  m_interactionList(nullptr),
76  m_item(nullptr),
77  m_modelsChanged(false),
78  m_haveWindow(false),
79  m_mustBuild(true),
80  m_layer(0)
81 {
82 }
const FWEventItem * m_item
FWInteractionList * m_interactionList
FWProxyBuilderBase::~FWProxyBuilderBase ( )
virtual

Definition at line 84 of file FWProxyBuilderBase.cc.

References m_products.

85 {
86  m_products.clear();
87 }
std::vector< Product * > m_products
FWProxyBuilderBase::FWProxyBuilderBase ( const FWProxyBuilderBase )
protected

Member Function Documentation

void FWProxyBuilderBase::build ( )

Definition at line 131 of file FWProxyBuilderBase.cc.

References FWInteractionList::added(), buildViewType(), clean(), cmsRelvalreport::exit, fwLog, haveSingleProduct(), mps_fire::i, item(), fwlog::kError, layer(), m_interactionList, m_item, m_mustBuild, m_products, FWEventItem::name(), and FWEventItem::size().

Referenced by FWCandidateTowerProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFCandidateTowerProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWCaloTowerProxyBuilderBase::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWHFTowerProxyBuilderBase::build(), FWHGTowerProxyBuilderBase::build(), FWCaloRecHitDigitSetProxyBuilder::havePerViewProduct(), FWPFPatJetLegoProxyBuilder< reco::PFJet >::havePerViewProduct(), itemChanged(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::modelData(), setHaveWindow(), FWPFEcalRecHitLegoProxyBuilder::typeOfBuilder(), FWSimpleProxyBuilder::visibilityModelChanges(), FWCaloDataProxyBuilderBase::willHandleInteraction(), FWPFEcalClusterLegoProxyBuilder::~FWPFEcalClusterLegoProxyBuilder(), FWPFEcalClusterRPZProxyBuilder::~FWPFEcalClusterRPZProxyBuilder(), FWPFEcalRecHitRPProxyBuilder::~FWPFEcalRecHitRPProxyBuilder(), FWPFHcalClusterLegoProxyBuilder::~FWPFHcalClusterLegoProxyBuilder(), FWPFHcalClusterRPZProxyBuilder::~FWPFHcalClusterRPZProxyBuilder(), FWPFTrack3DProxyBuilder::~FWPFTrack3DProxyBuilder(), and FWPFTrackRPZProxyBuilder::~FWPFTrackRPZProxyBuilder().

132 {
133  if (m_item)
134  {
135  try
136  {
137  size_t itemSize = m_item->size(); //cashed
138 
139  clean();
140  for (Product_it i = m_products.begin(); i != m_products.end(); ++i)
141  {
142  //printf("build() %s \n", m_item->name().c_str());
143  TEveElementList* elms = (*i)->m_elements;
144  size_t oldSize = elms->NumChildren();
145 
146  if (haveSingleProduct())
147  {
148  build(m_item, elms, (*i)->m_viewContext);
149  }
150  else
151  {
152  buildViewType(m_item, elms, (*i)->m_viewType, (*i)->m_viewContext);
153  }
154 
155  // Project all children of current product.
156  // If product is not registered into any projection-manager,
157  // this does nothing.
158  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(elms);
159  if (pable->HasProjecteds())
160  {
161  // loop projected holders
162  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
163  {
164  TEveProjectionManager *pmgr = (*i)->GetManager();
165  Float_t oldDepth = pmgr->GetCurrentDepth();
166  pmgr->SetCurrentDepth(item()->layer());
167  size_t cnt = 0;
168 
169  TEveElement* projectedAsElement = (*i)->GetProjectedAsElement();
170  TEveElement::List_i parentIt = projectedAsElement->BeginChildren();
171  for (TEveElement::List_i prodIt = elms->BeginChildren(); prodIt != elms->EndChildren(); ++prodIt, ++cnt)
172  {
173  // reused projected holder
174  if (cnt < oldSize)
175  {
176  if ((*parentIt)->NumChildren()) {
177  // update projected (mislleading name)
178  for ( TEveElement::List_i pci = (*parentIt)->BeginChildren(); pci != (*parentIt)->EndChildren(); pci++)
179  pmgr->ProjectChildrenRecurse(*parentIt);
180  }
181  else {
182  // import projectable
183  pmgr->SubImportChildren(*prodIt, *parentIt);
184  }
185 
186  ++parentIt;
187  }
188  else if (cnt < itemSize)
189  {
190  // new product holder
191  pmgr->SubImportElements(*prodIt, projectedAsElement);
192  }
193  else
194  {
195  break;
196  }
197  }
198  pmgr->SetCurrentDepth(oldDepth);
199  }
200  }
201 
202 
203  if (m_interactionList && itemSize > oldSize)
204  {
205  TEveElement::List_i elIt = elms->BeginChildren();
206  for (size_t cnt = 0; cnt < itemSize; ++cnt, ++elIt)
207  {
208  if (cnt >= oldSize )
209  m_interactionList->added(*elIt, cnt);
210  }
211  }
212  }
213  }
214  catch (const std::runtime_error& iException)
215  {
216  fwLog(fwlog::kError) << "Caught exception in build function for item " << m_item->name() << ":\n"
217  << iException.what() << std::endl;
218  exit(1);
219  }
220  }
221  m_mustBuild = false;
222 }
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
const std::string & name() const
Definition: FWEventItem.cc:502
const FWEventItem * m_item
void added(TEveElement *, unsigned int)
const FWEventItem * item() const
virtual bool haveSingleProduct() const
size_t size() const
Definition: FWEventItem.cc:550
#define fwLog(_level_)
Definition: fwLog.h:50
FWInteractionList * m_interactionList
void FWProxyBuilderBase::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext  
)
protectedvirtual
void FWProxyBuilderBase::buildViewType ( const FWEventItem iItem,
TEveElementList *  ,
FWViewType::EType  ,
const FWViewContext  
)
protectedvirtual

Reimplemented in FWDTDigiProxyBuilder, FWSimpleProxyBuilder, FWCaloTauProxyBuilder, and FWPFTauProxyBuilder.

Definition at line 419 of file FWProxyBuilderBase.cc.

Referenced by build().

420 {
421  assert("virtual buildViewType(const FWEventItem*, TEveElementList*, FWViewType::EType, const FWViewContext*) not implemented by inherited class");
422 }
bool FWProxyBuilderBase::canHandle ( const FWEventItem item)
virtual

Definition at line 286 of file FWProxyBuilderBase.cc.

References m_item, and FWEventItem::purpose().

287 {
288  if (m_item)
289  return (item.purpose() == m_item->purpose());
290 
291  return false;
292 }
const FWEventItem * m_item
const std::string & purpose() const
Definition: FWEventItem.cc:514
void FWProxyBuilderBase::clean ( )
protectedvirtual

Reimplemented in FWSimpleProxyBuilder.

Definition at line 393 of file FWProxyBuilderBase.cc.

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

Referenced by build().

394 {
395  // Cleans local common element list.
396  for (Product_it i = m_products.begin(); i != m_products.end(); ++i)
397  {
398  if ((*i)->m_elements)
399  (*i)->m_elements->DestroyElements();
400  }
401 
402  cleanLocal();
403 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual void cleanLocal()
void FWProxyBuilderBase::cleanLocal ( )
protectedvirtual
void FWProxyBuilderBase::cleanProduct ( Product p)
private
const fireworks::Context & FWProxyBuilderBase::context ( ) const

Definition at line 513 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(), FWSecVertexProxyBuilder::build(), FWCandidatePtrProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSecVertexCandidateProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWGenParticleProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWCandidateHGCalLegoProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWCandidateLegoProxyBuilder::build(), FWVertexCandidateProxyBuilder::build(), FWVertexProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWMETProxyBuilder::buildViewType(), FWPFBlockProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWVertexCandidateProxyBuilder::localModelChanges(), FWVertexProxyBuilder::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), FWElectronProxyBuilder::requestCommon(), FWJetProxyBuilder::requestCommon(), FWCandidateHGCalLegoProxyBuilder::scaleProduct(), FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), FWPFPatJetLegoProxyBuilder< T >::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), FWPFBlockProxyBuilder::scaleProduct(), FWCaloDataHistProxyBuilder::setCaloData(), FWTrackProxyBuilderFullFramework::setItem(), FWVertexCandidateProxyBuilder::setItem(), FWVertexProxyBuilder::setItem(), FWJetProxyBuilder::setTextPos(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

514 {
515  return m_item->context();
516 }
const FWEventItem * m_item
const fireworks::Context & context() const
Definition: FWEventItem.h:128
TEveCompound * FWProxyBuilderBase::createCompound ( bool  set_color = true,
bool  propagate_color_to_all_children = false 
) const
protected

Definition at line 468 of file FWProxyBuilderBase.cc.

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

Referenced by FWPFCandidateWithHitsProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWGEMPadDigiProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWSimpleProxyBuilder::buildViewType(), and FWDTDigiProxyBuilder::buildViewType().

469 {
470  TEveCompound* c = new TEveCompound();
471  c->CSCTakeAnyParentAsMaster();
472  c->CSCImplySelectAllChildren();
473  c->SetPickable(true);
474  if (set_color)
475  {
476  c->SetMainColor(m_item->defaultDisplayProperties().color());
477  c->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
478  }
479  if (propagate_color_to_all_children)
480  {
481  c->CSCApplyMainColorToAllChildren();
482  c->CSCApplyMainTransparencyToAllChildren();
483  }
484  else
485  {
486  c->CSCApplyMainColorToMatchingChildren();
487  c->CSCApplyMainTransparencyToMatchingChildren();
488  }
489  return c;
490 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
const FWEventItem * m_item
Color_t color() const
Char_t transparency() const
void set_color(TEveElement *element, Color_t color, float alpha, unsigned int levels)
Definition: eve_macros.cc:154
TEveElementList * FWProxyBuilderBase::createProduct ( FWViewType::EType  viewType,
const FWViewContext viewContext 
)

Definition at line 297 of file FWProxyBuilderBase.cc.

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

Referenced by FWEveViewManager::newItem().

298 {
299  if ( havePerViewProduct(viewType) == false && m_products.empty() == false)
300  {
301  if (haveSingleProduct())
302  {
303  return m_products.back()->m_elements;
304  }
305  else
306  {
307  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
308  {
309  if (viewType == (*i)->m_viewType)
310  return (*i)->m_elements;
311  }
312  }
313  }
314 
315  // printf("new product %s for item %s \n", FWViewType::idToName(viewType).c_str(), item()->name().c_str()); fflush(stdout);
316 
317  Product* product = new Product(viewType, viewContext);
318  m_products.push_back(product);
319  if (viewContext)
320  {
321  product->m_scaleConnection = viewContext->scaleChanged_.connect(boost::bind(&FWProxyBuilderBase::scaleChanged, this, _1));
322  }
323 
324  if (item())
325  {
326  // debug info in eve browser
327  product->m_elements->SetElementName(item()->name().c_str());
328  }
329  return product->m_elements;
330 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual bool havePerViewProduct(FWViewType::EType) const
void scaleChanged(const FWViewContext *)
const FWEventItem * item() const
sigc::signal< void, const FWViewContext * > scaleChanged_
Definition: FWViewContext.h:43
virtual bool haveSingleProduct() const
bool FWProxyBuilderBase::getHaveWindow ( ) const
inline
virtual bool FWProxyBuilderBase::havePerViewProduct ( FWViewType::EType  ) const
inlinevirtual
virtual bool FWProxyBuilderBase::haveSingleProduct ( void  ) const
inlinevirtual
void FWProxyBuilderBase::increaseComponentTransparency ( unsigned int  index,
TEveElement *  holder,
const std::string &  name,
Char_t  transpOffset 
)
protected

Definition at line 493 of file FWProxyBuilderBase.cc.

References FWEventItem::ModelInfo::displayProperties(), item(), funct::m, patRefSel_triggerMatching_cfi::matches, Min(), FWEventItem::modelInfo(), and FWDisplayProperties::transparency().

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

495 {
496  // Helper function to increse transparency of certain components.
497 
499  Char_t transp = TMath::Min(100, transpOffset + (100 - transpOffset) * dp.transparency() / 100);
501  holder->FindChildren(matches, name.c_str());
502  for (TEveElement::List_i m = matches.begin(); m != matches.end(); ++m)
503  {
504  (*m)->SetMainTransparency(transp);
505  }
506 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:68
T Min(T a, T b)
Definition: MathUtil.h:39
const FWEventItem * item() const
std::list< Particle > List_t
Definition: Particle.h:141
Char_t transparency() const
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:537
const FWEventItem* FWProxyBuilderBase::item ( ) const
inline

Definition at line 67 of file FWProxyBuilderBase.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

67  {
68  return m_item;
69  }
const FWEventItem * m_item
void FWProxyBuilderBase::itemBeingDestroyed ( const FWEventItem iItem)
virtual

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

Definition at line 114 of file FWProxyBuilderBase.cc.

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

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

115 {
116  m_item=nullptr;
117 
118  cleanLocal();
119 
120  for (Product_it i = m_products.begin(); i!= m_products.end(); i++)
121  {
122 
123  (*i)->m_scaleConnection.disconnect();
124  delete (*i);
125  }
126 
127  m_products.clear();
128 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual void cleanLocal()
const FWEventItem * m_item
void FWProxyBuilderBase::itemChanged ( const FWEventItem iItem)

Definition at line 271 of file FWProxyBuilderBase.cc.

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

Referenced by FWEveViewManager::itemChanged().

272 {
273  if (iItem->layer() != m_layer)
274  setProjectionLayer(iItem->layer());
275 
276  if(m_haveWindow) {
277  build();
278  } else {
279  m_mustBuild=true;
280  }
281  m_modelsChanged=false;
282 }
int layer() const
Definition: FWEventItem.cc:459
void setProjectionLayer(float)
int FWProxyBuilderBase::layer ( ) const
void FWProxyBuilderBase::localModelChanges ( const FWModelId iId,
TEveElement *  iCompound,
FWViewType::EType  viewType,
const FWViewContext vc 
)
protectedvirtual
void FWProxyBuilderBase::modelChanges ( const FWModelIds iIds)

Definition at line 256 of file FWProxyBuilderBase.cc.

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

Referenced by FWEveViewManager::modelChanges().

257 {
258  if(m_haveWindow) {
259  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
260  {
261  modelChanges(iIds, *i);
262  }
263  m_modelsChanged=false;
264  } else {
265  m_modelsChanged=true;
266  }
267 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
void modelChanges(const FWModelIds &)
void FWProxyBuilderBase::modelChanges ( const FWModelIds iIds,
Product p 
)
protectedvirtual

Reimplemented in FWDigitSetProxyBuilder, and FWCaloDataProxyBuilderBase.

Definition at line 226 of file FWProxyBuilderBase.cc.

References localModelChanges(), FWProxyBuilderBase::Product::m_elements, m_item, FWProxyBuilderBase::Product::m_viewContext, FWProxyBuilderBase::Product::m_viewType, FWEventItem::size(), and visibilityModelChanges().

227 {
228  TEveElementList* elms = p->m_elements;
229  assert(m_item && static_cast<int>(m_item->size()) <= elms->NumChildren() && "can not use default modelChanges implementation");
230 
231  TEveElement::List_i itElement = elms->BeginChildren();
232  int index = 0;
233  for (FWModelIds::const_iterator it = iIds.begin(), itEnd = iIds.end();
234  it != itEnd;
235  ++it,++itElement,++index)
236  {
237  assert(itElement != elms->EndChildren());
238  while (index < it->index())
239  {
240  ++itElement;
241  ++index;
242  assert(itElement != elms->EndChildren());
243  }
244  if (visibilityModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext))
245  {
246  elms->ProjectChild(*itElement);
247  }
248  else
249  {
250  localModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext);
251  }
252  }
253 }
virtual bool visibilityModelChanges(const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
const FWEventItem * m_item
virtual void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
size_t size() const
Definition: FWEventItem.cc:550
const FWProxyBuilderBase& FWProxyBuilderBase::operator= ( const FWProxyBuilderBase )
protected
void FWProxyBuilderBase::removePerViewProduct ( FWViewType::EType  type,
const FWViewContext vc 
)

Definition at line 335 of file FWProxyBuilderBase.cc.

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

336 {
337  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
338  {
339  if (havePerViewProduct(type) && (*i)->m_viewContext == vc)
340  {
341  if ((*i)->m_elements)
342  (*i)->m_elements->DestroyElements();
343 
344  if ( (*i)->m_viewContext)
345  (*i)->m_scaleConnection.disconnect();
346 
347  delete (*i);
348  m_products.erase(i);
349  break;
350  }
351  }
352 }
type
Definition: HCALResponse.h:21
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
virtual bool havePerViewProduct(FWViewType::EType) const
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 533 of file FWProxyBuilderBase.cc.

534 {
535  return false;
536 }
void FWProxyBuilderBase::scaleChanged ( const FWViewContext vc)

Definition at line 380 of file FWProxyBuilderBase.cc.

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

Referenced by createProduct().

381 {
382  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
383  {
384  if ( havePerViewProduct((*i)->m_viewType) && (*i)->m_viewContext == vc)
385  {
386  scaleProduct((*i)->m_elements, (*i)->m_viewType, (*i)->m_viewContext);
387  }
388  }
389  gEve->Redraw3D();
390 }
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
virtual void FWProxyBuilderBase::scaleProduct ( TEveElementList *  parent,
FWViewType::EType  ,
const FWViewContext vc 
)
inlineprotectedvirtual
void FWProxyBuilderBase::setHaveWindow ( bool  iFlag)

Definition at line 100 of file FWProxyBuilderBase.cc.

References build(), m_haveWindow, and m_mustBuild.

Referenced by FWEveViewManager::newItem().

101 {
102  bool oldValue = m_haveWindow;
103  m_haveWindow=iFlag;
104 
105  if(iFlag && !oldValue) {
106  //this is our first view so may need to rerun our building
107  if(m_mustBuild) {
108  build();
109  }
110  }
111 }
void FWProxyBuilderBase::setInteractionList ( FWInteractionList l,
const std::string &   
)
virtual

Definition at line 357 of file FWProxyBuilderBase.cc.

References checklumidiff::l, and m_interactionList.

Referenced by FWEveViewManager::newItem().

358 {
359  // Called if willHandleInteraction() returns false. Purpose ignored by default.
360 
362 }
FWInteractionList * m_interactionList
void FWProxyBuilderBase::setItem ( const FWEventItem iItem)
virtual
void FWProxyBuilderBase::setProjectionLayer ( float  layer)
private

Definition at line 425 of file FWProxyBuilderBase.cc.

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

Referenced by itemChanged().

426 {
427  m_layer = layer;
428  for (Product_it pIt = m_products.begin(); pIt != m_products.end(); ++pIt)
429  {
430  TEveProjectable* pable = static_cast<TEveProjectable*>((*pIt)->m_elements);
431  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
432  (*i)->SetDepth(m_layer);
433  }
434 }
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
void FWProxyBuilderBase::setupAddElement ( TEveElement *  el,
TEveElement *  parent,
bool  set_color = true 
) const

Definition at line 439 of file FWProxyBuilderBase.cc.

References setupElement().

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

440 {
441  setupElement(el, color);
442  parent->AddElement(el);
443 }
void setupElement(TEveElement *el, bool color=true) const
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 449 of file FWProxyBuilderBase.cc.

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

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

450 {
451  el->CSCTakeAnyParentAsMaster();
452  el->SetPickable(true);
453 
454  if (color)
455  {
456  el->CSCApplyMainColorToMatchingChildren();
457  el->CSCApplyMainTransparencyToMatchingChildren();
458  el->SetMainColor(m_item->defaultDisplayProperties().color());
459  assert((m_item->defaultDisplayProperties().transparency() >= 0)
460  && (m_item->defaultDisplayProperties().transparency() <= 100));
461  el->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
462  }
463 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:453
const FWEventItem * m_item
Color_t color() const
Char_t transparency() const
std::string FWProxyBuilderBase::typeOfBuilder ( )
static

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

Definition at line 528 of file FWProxyBuilderBase.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

Reimplemented in FWSimpleProxyBuilder, and FWTrackProxyBuilderFullFramework.

Definition at line 366 of file FWProxyBuilderBase.cc.

Referenced by modelChanges().

367 {
368  return false;
369 }
virtual bool FWProxyBuilderBase::willHandleInteraction ( ) const
inlinevirtual

Reimplemented in FWCaloDataProxyBuilderBase, and FWDigitSetProxyBuilder.

Definition at line 96 of file FWProxyBuilderBase.h.

Referenced by FWEveViewManager::newItem().

96 { return false; }

Member Data Documentation

bool FWProxyBuilderBase::m_haveWindow
private

Definition at line 152 of file FWProxyBuilderBase.h.

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

FWInteractionList* FWProxyBuilderBase::m_interactionList
private

Definition at line 147 of file FWProxyBuilderBase.h.

Referenced by build(), and setInteractionList().

const FWEventItem* FWProxyBuilderBase::m_item
private
float FWProxyBuilderBase::m_layer
private

Definition at line 155 of file FWProxyBuilderBase.h.

Referenced by itemChanged(), and setProjectionLayer().

bool FWProxyBuilderBase::m_modelsChanged
private

Definition at line 151 of file FWProxyBuilderBase.h.

Referenced by itemChanged(), and modelChanges().

bool FWProxyBuilderBase::m_mustBuild
private

Definition at line 153 of file FWProxyBuilderBase.h.

Referenced by build(), itemChanged(), and setHaveWindow().

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