#include <Fireworks/Core/interface/FWProxyBuilderBase.h>
Classes | |
struct | Product |
Public Member Functions | |
void | build () |
virtual bool | canHandle (const FWEventItem &) |
const fireworks::Context & | context () const |
TEveElementList * | createProduct (FWViewType::EType, const FWViewContext *) |
FWProxyBuilderBase () | |
bool | getHaveWindow () const |
virtual bool | havePerViewProduct (FWViewType::EType) const |
virtual bool | haveSingleProduct () const |
const FWEventItem * | item () const |
virtual void | itemBeingDestroyed (const FWEventItem *) |
void | itemChanged (const FWEventItem *) |
int | layer () const |
void | modelChanges (const FWModelIds &) |
void | removePerViewProduct (FWViewType::EType, const FWViewContext *vc) |
void | scaleChanged (const FWViewContext *) |
void | setHaveWindow (bool iFlag) |
virtual void | setInteractionList (FWInteractionList *, const std::string &) |
void | setItem (const FWEventItem *iItem) |
void | setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const |
void | setupElement (TEveElement *el, bool color=true) const |
virtual bool | willHandleInteraction () const |
virtual | ~FWProxyBuilderBase () |
Static Public Member Functions | |
static bool | representsSubPart () |
static std::string | typeOfBuilder () |
Used by the plugin system to determine how the proxy uses the data from FWEventItem. | |
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 FWProxyBuilderBase & | operator= (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 |
FWInteractionList * | m_interactionList |
const FWEventItem * | m_item |
float | m_layer |
bool | m_modelsChanged |
bool | m_mustBuild |
Description: [one line class summary]
Usage: <usage>
Definition at line 47 of file FWProxyBuilderBase.h.
typedef std::vector<Product*>::iterator FWProxyBuilderBase::Product_it [protected] |
Definition at line 138 of file FWProxyBuilderBase.h.
FWProxyBuilderBase::FWProxyBuilderBase | ( | ) |
Definition at line 75 of file FWProxyBuilderBase.cc.
: m_interactionList(0), m_item(0), m_modelsChanged(false), m_haveWindow(false), m_mustBuild(true), m_layer(0) { }
FWProxyBuilderBase::~FWProxyBuilderBase | ( | ) | [virtual] |
FWProxyBuilderBase::FWProxyBuilderBase | ( | const FWProxyBuilderBase & | ) | [protected] |
void FWProxyBuilderBase::build | ( | ) |
Definition at line 132 of file FWProxyBuilderBase.cc.
References FWInteractionList::added(), buildViewType(), clean(), cmsRelvalreport::exit, fwLog, haveSingleProduct(), i, item(), fwlog::kError, layer(), m_interactionList, m_item, m_mustBuild, m_products, FWEventItem::name(), and FWEventItem::size().
Referenced by FWCaloTowerProxyBuilderBase::build(), FWHFTowerProxyBuilderBase::build(), FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >::build(), FWSimpleProxyBuilder::build(), itemChanged(), setHaveWindow(), and FWSimpleProxyBuilder::visibilityModelChanges().
{ if (m_item) { try { size_t itemSize = m_item->size(); //cashed clean(); for (Product_it i = m_products.begin(); i != m_products.end(); ++i) { // printf("build() %s \n", m_item->name().c_str()); TEveElementList* elms = (*i)->m_elements; size_t oldSize = elms->NumChildren(); if (haveSingleProduct()) { build(m_item, elms, (*i)->m_viewContext); } else { buildViewType(m_item, elms, (*i)->m_viewType, (*i)->m_viewContext); } // Project all children of current product. // If product is not registered into any projection-manager, // this does nothing. TEveProjectable* pable = dynamic_cast<TEveProjectable*>(elms); if (pable->HasProjecteds()) { for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i) { TEveProjectionManager *pmgr = (*i)->GetManager(); Float_t oldDepth = pmgr->GetCurrentDepth(); pmgr->SetCurrentDepth(item()->layer()); size_t cnt = 0; TEveElement* projectedAsElement = (*i)->GetProjectedAsElement(); TEveElement::List_i parentIt = projectedAsElement->BeginChildren(); for (TEveElement::List_i prodIt = elms->BeginChildren(); prodIt != elms->EndChildren(); ++prodIt, ++cnt) { if (cnt < oldSize) { // reused projected holder pmgr->SubImportChildren(*prodIt, *parentIt); ++parentIt; } else if (cnt < itemSize) { // new product holder pmgr->SubImportElements(*prodIt, projectedAsElement); } else { break; } } pmgr->SetCurrentDepth(oldDepth); } } if (m_interactionList && itemSize > oldSize) { TEveElement::List_i elIt = elms->BeginChildren(); for (size_t cnt = 0; cnt < itemSize; ++cnt, ++elIt) { if (cnt >= oldSize ) m_interactionList->added(*elIt, cnt); } } } } catch (const std::runtime_error& iException) { fwLog(fwlog::kError) << "Caught exception in build function for item " << m_item->name() << ":\n" << iException.what() << std::endl; exit(1); } } m_mustBuild = false; }
void FWProxyBuilderBase::build | ( | const FWEventItem * | iItem, |
TEveElementList * | product, | ||
const FWViewContext * | |||
) | [protected, virtual] |
Reimplemented in FWCaloDataProxyBuilderBase, FWCaloTowerProxyBuilderBase, FWCastorRecHitProxyBuilder, FWEcalRecHitProxyBuilder, FWHBHERecHitProxyBuilder, FWHFRecHitProxyBuilder, FWHFTowerProxyBuilderBase, FWHORecHitProxyBuilder, FWPRCaloTowerProxyBuilder, FWZDCRecHitProxyBuilder, FWSimpleProxyBuilder, FWCSCStripDigiProxyBuilder, FWCSCWireDigiProxyBuilder, FWRPCDigiProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, FWPFEcalRecHitRPProxyBuilder, FWPCaloHitProxyBuilder, FWSimTrackProxyBuilder, FWSiPixelClusterDetProxyBuilder, FWSiPixelClusterProxyBuilder, FWSiPixelDigiProxyBuilder, and FWSiStripDigiProxyBuilder.
Definition at line 404 of file FWProxyBuilderBase.cc.
{
assert("virtual build(const FWEventItem*, TEveElementList*, const FWViewContext*) not implemented by inherited class");
}
void FWProxyBuilderBase::buildViewType | ( | const FWEventItem * | iItem, |
TEveElementList * | , | ||
FWViewType::EType | , | ||
const FWViewContext * | |||
) | [protected, virtual] |
Reimplemented in FWCaloTauProxyBuilder, FWPFTauProxyBuilder, FWSimpleProxyBuilder, and FWDTDigiProxyBuilder.
Definition at line 410 of file FWProxyBuilderBase.cc.
Referenced by build().
{
assert("virtual buildViewType(const FWEventItem*, TEveElementList*, FWViewType::EType, const FWViewContext*) not implemented by inherited class");
}
bool FWProxyBuilderBase::canHandle | ( | const FWEventItem & | item | ) | [virtual] |
Definition at line 277 of file FWProxyBuilderBase.cc.
References m_item, and FWEventItem::purpose().
void FWProxyBuilderBase::clean | ( | ) | [protected, virtual] |
Reimplemented in FWSimpleProxyBuilder.
Definition at line 384 of file FWProxyBuilderBase.cc.
References cleanLocal(), i, and m_products.
Referenced by build().
{ // Cleans local common element list. for (Product_it i = m_products.begin(); i != m_products.end(); ++i) { if ((*i)->m_elements) (*i)->m_elements->DestroyElements(); } cleanLocal(); }
void FWProxyBuilderBase::cleanLocal | ( | ) | [protected, virtual] |
Reimplemented in FWTauProxyBuilderBase, FWJetProxyBuilder, FWMET3DProxyBuilder, FWMETProxyBuilder, FWConversionProxyBuilder, FWElectronProxyBuilder, FWPFBlockProxyBuilder, FWPFClusterRPZProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, and FWPFEcalRecHitRPProxyBuilder.
Definition at line 397 of file FWProxyBuilderBase.cc.
Referenced by FWSimpleProxyBuilder::clean(), clean(), and itemBeingDestroyed().
{
// Cleans local common element list.
}
void FWProxyBuilderBase::cleanProduct | ( | Product * | p | ) | [private] |
const fireworks::Context & FWProxyBuilderBase::context | ( | ) | const |
Definition at line 504 of file FWProxyBuilderBase.cc.
References FWEventItem::context(), and m_item.
Referenced by FWTauProxyBuilderBase::addConstituentTracks(), fireworks::addDashedLine(), FWTauProxyBuilderBase::addLeadTrack(), FWPFCandidate3DProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWTrackProxyBuilder::build(), FWVertexWithTracksProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWHBHERecHitProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWJetProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWPFBlockProxyBuilder::buildViewType(), fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), FWJetProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), FWPFPatJetLegoProxyBuilder< T >::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCaloTowerProxyBuilderBase::setCaloData(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterLegoProxyBuilder::sharedBuild(), and FWPFClusterRPZProxyBuilder::sharedBuild().
TEveCompound * FWProxyBuilderBase::createCompound | ( | bool | set_color = true , |
bool | propagate_color_to_all_children = false |
||
) | const [protected] |
Definition at line 459 of file FWProxyBuilderBase.cc.
References trackerHits::c, FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), m_item, and FWDisplayProperties::transparency().
Referenced by FWPFEcalRecHitLegoProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), and FWSimpleProxyBuilder::buildViewType().
{ TEveCompound* c = new TEveCompound(); c->CSCTakeAnyParentAsMaster(); c->CSCImplySelectAllChildren(); c->SetPickable(true); if (set_color) { c->SetMainColor(m_item->defaultDisplayProperties().color()); c->SetMainTransparency(m_item->defaultDisplayProperties().transparency()); } if (propagate_color_to_all_children) { c->CSCApplyMainColorToAllChildren(); c->CSCApplyMainTransparencyToAllChildren(); } else { c->CSCApplyMainColorToMatchingChildren(); c->CSCApplyMainTransparencyToMatchingChildren(); } return c; }
TEveElementList * FWProxyBuilderBase::createProduct | ( | FWViewType::EType | viewType, |
const FWViewContext * | viewContext | ||
) |
Definition at line 288 of file FWProxyBuilderBase.cc.
References havePerViewProduct(), haveSingleProduct(), i, item(), FWProxyBuilderBase::Product::m_elements, m_products, FWProxyBuilderBase::Product::m_scaleConnection, AlCaRecoCosmics_cfg::name, scaleChanged(), and FWViewContext::scaleChanged_.
Referenced by FWEveViewManager::newItem().
{ if ( havePerViewProduct(viewType) == false && m_products.empty() == false) { if (haveSingleProduct()) { return m_products.back()->m_elements; } else { for (Product_it i = m_products.begin(); i!= m_products.end(); ++i) { if (viewType == (*i)->m_viewType) return (*i)->m_elements; } } } // printf("new product %s for item %s \n", FWViewType::idToName(viewType).c_str(), item()->name().c_str()); fflush(stdout); Product* product = new Product(viewType, viewContext); m_products.push_back(product); if (viewContext) { product->m_scaleConnection = viewContext->scaleChanged_.connect(boost::bind(&FWProxyBuilderBase::scaleChanged, this, _1)); } if (item()) { // debug info in eve browser product->m_elements->SetElementName(item()->name().c_str()); } return product->m_elements; }
bool FWProxyBuilderBase::getHaveWindow | ( | ) | const [inline] |
Definition at line 102 of file FWProxyBuilderBase.h.
References m_haveWindow.
Referenced by FWEveViewManager::itemChanged(), and FWEveViewManager::modelChanges().
{ return m_haveWindow; }
virtual bool FWProxyBuilderBase::havePerViewProduct | ( | FWViewType::EType | ) | const [inline, virtual] |
Reimplemented in FWTauProxyBuilderBase, FWEcalRecHitProxyBuilder, FWHBHERecHitProxyBuilder, FWJetProxyBuilder, FWMET3DProxyBuilder, FWMETProxyBuilder, FWPFBlockProxyBuilder, FWPFCandidatesLegoProxyBuilder, FWPFClusterLegoProxyBuilder, FWPFClusterRPZProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, FWPFEcalRecHitRPProxyBuilder, FWPFPatJetLegoProxyBuilder< T >, FWPFPatJetLegoProxyBuilder< pat::Jet >, and FWPFPatJetLegoProxyBuilder< reco::PFJet >.
Definition at line 96 of file FWProxyBuilderBase.h.
Referenced by createProduct(), FWEveViewManager::newItem(), removePerViewProduct(), and scaleChanged().
{ return false; }
virtual bool FWProxyBuilderBase::haveSingleProduct | ( | void | ) | const [inline, virtual] |
Reimplemented in FWTauProxyBuilderBase, FWJetProxyBuilder, FWMETProxyBuilder, FWConversionProxyBuilder, FWElectronProxyBuilder, FWPhotonProxyBuilder, FWDTDigiProxyBuilder, FWDTRecHitProxyBuilder, FWRPCRecHitProxyBuilder, and FWPFBlockProxyBuilder.
Definition at line 95 of file FWProxyBuilderBase.h.
Referenced by build(), createProduct(), and FWSimpleProxyBuilder::visibilityModelChanges().
{ return true; }
void FWProxyBuilderBase::increaseComponentTransparency | ( | unsigned int | index, |
TEveElement * | holder, | ||
const std::string & | name, | ||
Char_t | transpOffset | ||
) | [protected] |
Definition at line 484 of file FWProxyBuilderBase.cc.
References item(), m, siStripFEDMonitor_P5_cff::Min, FWEventItem::modelInfo(), and FWDisplayProperties::transparency().
Referenced by FWMuonRhoPhiProxyBuilder::build(), FWMuonProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWMuonRhoPhiProxyBuilder::localModelChanges(), FWTauProxyBuilderBase::localModelChanges(), FWJetProxyBuilder::localModelChanges(), FWSiStripClusterProxyBuilder::localModelChanges(), and FWMuonProxyBuilder::localModelChanges().
{ // Helper function to increse transparency of certain components. const FWDisplayProperties& dp = item()->modelInfo(index).displayProperties(); Char_t transp = TMath::Min(100, transpOffset + (100 - transpOffset) * dp.transparency() / 100); TEveElement::List_t matches; holder->FindChildren(matches, name.c_str()); for (TEveElement::List_i m = matches.begin(); m != matches.end(); ++m) { (*m)->SetMainTransparency(transp); } }
const FWEventItem* FWProxyBuilderBase::item | ( | ) | const [inline] |
Definition at line 68 of file FWProxyBuilderBase.h.
References m_item.
Referenced by FWDigitSetProxyBuilder::addBoxSetToProduct(), FWHFTowerProxyBuilderBase::assertCaloDataSlice(), FWCaloTowerProxyBuilderBase::assertCaloDataSlice(), FWCaloClusterProxyBuilder::build(), FWCastorRecHitProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWPFEcalClusterRPZProxyBuilder::build(), FWVertexWithTracksProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWPFHcalClusterRPZProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWTracksModulesProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), build(), FWPSimHitProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWVertexProxyBuilder::build(), FWCaloDataProxyBuilderBase::build(), FWSecVertexProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), FWHORecHitProxyBuilder::build(), FWDTSegmentProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWPhotonProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), createProduct(), FWCaloTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), FWSimTrackProxyBuilder::getVertices(), increaseComponentTransparency(), FWEveViewManager::itemChanged(), FWPFClusterLegoProxyBuilder::localModelChanges(), FWPFCandidatesLegoProxyBuilder::localModelChanges(), FWPFEcalRecHitLegoProxyBuilder::localModelChanges(), FWPFPatJetLegoProxyBuilder< T >::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), FWEveViewManager::modelChanges(), FWCaloDataProxyBuilderBase::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >::modelData(), FWProxyBuilderTemplate< EcalRecHit >::modelData(), FWJetProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), FWConversionProxyBuilder::requestCommon(), FWEcalRecHitProxyBuilder::scaleProduct(), FWHBHERecHitProxyBuilder::scaleProduct(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterLegoProxyBuilder::sharedBuild(), and FWPFClusterRPZProxyBuilder::sharedBuild().
{ return m_item; }
void FWProxyBuilderBase::itemBeingDestroyed | ( | const FWEventItem * | iItem | ) | [virtual] |
Reimplemented in FWCaloDataProxyBuilderBase, FWCaloTowerProxyBuilderBase, and FWHFTowerProxyBuilderBase.
Definition at line 115 of file FWProxyBuilderBase.cc.
References cleanLocal(), i, m_item, and m_products.
{ m_item=0; cleanLocal(); for (Product_it i = m_products.begin(); i!= m_products.end(); i++) { (*i)->m_scaleConnection.disconnect(); delete (*i); } m_products.clear(); }
void FWProxyBuilderBase::itemChanged | ( | const FWEventItem * | iItem | ) |
Definition at line 262 of file FWProxyBuilderBase.cc.
References build(), FWEventItem::layer(), m_haveWindow, m_layer, m_modelsChanged, m_mustBuild, and setProjectionLayer().
Referenced by FWEveViewManager::itemChanged().
{ if (iItem->layer() != m_layer) setProjectionLayer(iItem->layer()); if(m_haveWindow) { build(); } else { m_mustBuild=true; } m_modelsChanged=false; }
int FWProxyBuilderBase::layer | ( | ) | const |
Definition at line 510 of file FWProxyBuilderBase.cc.
References FWEventItem::layer(), and m_item.
Referenced by FWPFEcalClusterRPZProxyBuilder::build(), build(), FWPFEcalClusterLegoProxyBuilder::build(), FWPFHcalClusterLegoProxyBuilder::build(), and setProjectionLayer().
void FWProxyBuilderBase::localModelChanges | ( | const FWModelId & | iId, |
TEveElement * | iCompound, | ||
FWViewType::EType | viewType, | ||
const FWViewContext * | vc | ||
) | [protected, virtual] |
Reimplemented in FWTauProxyBuilderBase, FWJetProxyBuilder, FWMuonProxyBuilder, FWMuonRhoPhiProxyBuilder, FWPFCandidatesLegoProxyBuilder, FWPFClusterLegoProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, FWPFPatJetLegoProxyBuilder< T >, FWSiStripClusterProxyBuilder, FWPFPatJetLegoProxyBuilder< pat::Jet >, and FWPFPatJetLegoProxyBuilder< reco::PFJet >.
Definition at line 363 of file FWProxyBuilderBase.cc.
Referenced by modelChanges().
{ // Nothing to be done in base class. // Visibility, main color and main transparency are handled through FWInteractionList. }
void FWProxyBuilderBase::modelChanges | ( | const FWModelIds & | iIds | ) |
Definition at line 247 of file FWProxyBuilderBase.cc.
References i, m_haveWindow, m_modelsChanged, and m_products.
Referenced by FWEveViewManager::modelChanges().
{ if(m_haveWindow) { for (Product_it i = m_products.begin(); i!= m_products.end(); ++i) { modelChanges(iIds, *i); } m_modelsChanged=false; } else { m_modelsChanged=true; } }
void FWProxyBuilderBase::modelChanges | ( | const FWModelIds & | iIds, |
Product * | p | ||
) | [protected, virtual] |
Reimplemented in FWCaloDataProxyBuilderBase, and FWDigitSetProxyBuilder.
Definition at line 217 of file FWProxyBuilderBase.cc.
References getHLTprescales::index, localModelChanges(), FWProxyBuilderBase::Product::m_elements, m_item, FWProxyBuilderBase::Product::m_viewContext, FWProxyBuilderBase::Product::m_viewType, FWEventItem::size(), and visibilityModelChanges().
{ TEveElementList* elms = p->m_elements; assert(m_item && static_cast<int>(m_item->size()) <= elms->NumChildren() && "can not use default modelChanges implementation"); TEveElement::List_i itElement = elms->BeginChildren(); int index = 0; for (FWModelIds::const_iterator it = iIds.begin(), itEnd = iIds.end(); it != itEnd; ++it,++itElement,++index) { assert(itElement != elms->EndChildren()); while (index < it->index()) { ++itElement; ++index; assert(itElement != elms->EndChildren()); } if (visibilityModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext)) { elms->ProjectChild(*itElement); } else { localModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext); } } }
const FWProxyBuilderBase& FWProxyBuilderBase::operator= | ( | const FWProxyBuilderBase & | ) | [protected] |
void FWProxyBuilderBase::removePerViewProduct | ( | FWViewType::EType | type, |
const FWViewContext * | vc | ||
) |
Definition at line 326 of file FWProxyBuilderBase.cc.
References havePerViewProduct(), i, and m_products.
{ for (Product_it i = m_products.begin(); i!= m_products.end(); ++i) { if (havePerViewProduct(type) && (*i)->m_viewContext == vc) { if ((*i)->m_elements) (*i)->m_elements->DestroyElements(); if ( (*i)->m_viewContext) (*i)->m_scaleConnection.disconnect(); delete (*i); m_products.erase(i); break; } } }
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
Reimplemented in FWTracksModulesProxyBuilder, and FWTracksRecHitsProxyBuilder.
Definition at line 524 of file FWProxyBuilderBase.cc.
{ return false; }
void FWProxyBuilderBase::scaleChanged | ( | const FWViewContext * | vc | ) |
Definition at line 371 of file FWProxyBuilderBase.cc.
References havePerViewProduct(), i, m_products, and scaleProduct().
Referenced by createProduct().
{ for (Product_it i = m_products.begin(); i!= m_products.end(); ++i) { if ( havePerViewProduct((*i)->m_viewType) && (*i)->m_viewContext == vc) { scaleProduct((*i)->m_elements, (*i)->m_viewType, (*i)->m_viewContext); } } gEve->Redraw3D(); }
virtual void FWProxyBuilderBase::scaleProduct | ( | TEveElementList * | parent, |
FWViewType::EType | , | ||
const FWViewContext * | vc | ||
) | [inline, protected, virtual] |
Reimplemented in FWTauProxyBuilderBase, FWEcalRecHitProxyBuilder, FWHBHERecHitProxyBuilder, FWJetProxyBuilder, FWMET3DProxyBuilder, FWMETProxyBuilder, FWPFBlockProxyBuilder, FWPFCandidatesLegoProxyBuilder, FWPFClusterLegoProxyBuilder, FWPFClusterRPZProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, FWPFEcalRecHitRPProxyBuilder, FWPFPatJetLegoProxyBuilder< T >, FWPFPatJetLegoProxyBuilder< pat::Jet >, and FWPFPatJetLegoProxyBuilder< reco::PFJet >.
Definition at line 120 of file FWProxyBuilderBase.h.
Referenced by scaleChanged().
{};
void FWProxyBuilderBase::setHaveWindow | ( | bool | iFlag | ) |
Definition at line 101 of file FWProxyBuilderBase.cc.
References build(), m_haveWindow, and m_mustBuild.
Referenced by FWEveViewManager::newItem().
{ bool oldValue = m_haveWindow; m_haveWindow=iFlag; if(iFlag && !oldValue) { //this is our first view so may need to rerun our building if(m_mustBuild) { build(); } } }
void FWProxyBuilderBase::setInteractionList | ( | FWInteractionList * | l, |
const std::string & | |||
) | [virtual] |
Definition at line 348 of file FWProxyBuilderBase.cc.
References prof2calltree::l, and m_interactionList.
Referenced by FWEveViewManager::newItem().
{ // Called if willHandleInteraction() returns false. Purpose ignored by default. m_interactionList = l; }
void FWProxyBuilderBase::setItem | ( | const FWEventItem * | iItem | ) |
Definition at line 95 of file FWProxyBuilderBase.cc.
References m_item.
Referenced by FWEveViewManager::newItem().
{ m_item = iItem; }
void FWProxyBuilderBase::setProjectionLayer | ( | float | layer | ) | [private] |
Definition at line 416 of file FWProxyBuilderBase.cc.
References i, layer(), m_layer, and m_products.
Referenced by itemChanged().
{ m_layer = layer; for (Product_it pIt = m_products.begin(); pIt != m_products.end(); ++pIt) { TEveProjectable* pable = static_cast<TEveProjectable*>((*pIt)->m_elements); for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i) (*i)->SetDepth(m_layer); } }
void FWProxyBuilderBase::setupAddElement | ( | TEveElement * | el, |
TEveElement * | parent, | ||
bool | set_color = true |
||
) | const |
Definition at line 430 of file FWProxyBuilderBase.cc.
References setupElement().
Referenced by fireworks::addBox(), fireworks::addCircle(), FWTauProxyBuilderBase::addConstituentTracks(), fireworks::addDashedArrow(), fireworks::addDashedLine(), fireworks::addDoubleLines(), FWTauProxyBuilderBase::addLeadTrack(), fireworks::addRhoZEnergyProjection(), FWCaloClusterProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackingVertexProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFTrackLegoProxyBuilder::build(), FWPFTrackRPZProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWCandidateProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWPSimHitProxyBuilder::build(), FWElectronGlimpseProxyBuilder::build(), FWPhotonLegoProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWSimVertexProxyBuilder::build(), FWMuonLegoProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWBeamSpotOnlineProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWVertexProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWMuonGlimpseProxyBuilder::build(), FWPFTrack3DProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWDTSegmentProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWPFRhoPhiRecHit::buildRecHit(), FWPhotonProxyBuilder::buildViewType(), FWPFTauProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWConversionProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWElectronProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWPFLegoRecHit::FWPFLegoRecHit(), fireworks::makeRhoPhiSuperCluster(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFBlockProxyBuilder::setupTrackElement(), FWPFClusterLegoProxyBuilder::sharedBuild(), and FWPFClusterRPZProxyBuilder::sharedBuild().
{ setupElement(el, color); parent->AddElement(el); }
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 440 of file FWProxyBuilderBase.cc.
References FWDisplayProperties::color(), FWEventItem::defaultDisplayProperties(), m_item, and FWDisplayProperties::transparency().
Referenced by FWElectronProxyBuilder::requestCommon(), FWConversionProxyBuilder::requestCommon(), and setupAddElement().
{ el->CSCTakeAnyParentAsMaster(); el->SetPickable(true); if (color) { el->CSCApplyMainColorToMatchingChildren(); el->CSCApplyMainTransparencyToMatchingChildren(); el->SetMainColor(m_item->defaultDisplayProperties().color()); assert((m_item->defaultDisplayProperties().transparency() >= 0) && (m_item->defaultDisplayProperties().transparency() <= 100)); el->SetMainTransparency(m_item->defaultDisplayProperties().transparency()); } }
std::string FWProxyBuilderBase::typeOfBuilder | ( | ) | [static] |
Used by the plugin system to determine how the proxy uses the data from FWEventItem.
Reimplemented in FWSimpleProxyBuilder, FWPFClusterLegoProxyBuilder, FWPFEcalRecHitLegoProxyBuilder, and FWPFEcalRecHitRPProxyBuilder.
Definition at line 519 of file FWProxyBuilderBase.cc.
{
return std::string();
}
bool FWProxyBuilderBase::visibilityModelChanges | ( | const FWModelId & | , |
TEveElement * | , | ||
FWViewType::EType | , | ||
const FWViewContext * | |||
) | [protected, virtual] |
Reimplemented in FWSimpleProxyBuilder.
Definition at line 357 of file FWProxyBuilderBase.cc.
Referenced by modelChanges().
{ return false; }
virtual bool FWProxyBuilderBase::willHandleInteraction | ( | ) | const [inline, virtual] |
Reimplemented in FWCaloDataProxyBuilderBase, and FWDigitSetProxyBuilder.
Definition at line 97 of file FWProxyBuilderBase.h.
Referenced by FWEveViewManager::newItem().
{ return false; }
bool FWProxyBuilderBase::m_haveWindow [private] |
Definition at line 153 of file FWProxyBuilderBase.h.
Referenced by getHaveWindow(), itemChanged(), modelChanges(), and setHaveWindow().
Definition at line 148 of file FWProxyBuilderBase.h.
Referenced by build(), and setInteractionList().
const FWEventItem* FWProxyBuilderBase::m_item [private] |
Definition at line 150 of file FWProxyBuilderBase.h.
Referenced by build(), canHandle(), context(), createCompound(), item(), itemBeingDestroyed(), layer(), modelChanges(), setItem(), and setupElement().
float FWProxyBuilderBase::m_layer [private] |
Definition at line 156 of file FWProxyBuilderBase.h.
Referenced by itemChanged(), and setProjectionLayer().
bool FWProxyBuilderBase::m_modelsChanged [private] |
Definition at line 152 of file FWProxyBuilderBase.h.
Referenced by itemChanged(), and modelChanges().
bool FWProxyBuilderBase::m_mustBuild [private] |
Definition at line 154 of file FWProxyBuilderBase.h.
Referenced by build(), itemChanged(), and setHaveWindow().
std::vector<Product*> FWProxyBuilderBase::m_products [protected] |
Definition at line 140 of file FWProxyBuilderBase.h.
Referenced by build(), FWSimpleProxyBuilder::clean(), clean(), createProduct(), itemBeingDestroyed(), modelChanges(), removePerViewProduct(), scaleChanged(), setProjectionLayer(), and ~FWProxyBuilderBase().