CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 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  :
76  m_item(0),
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(), i, item(), fwlog::kError, layer(), m_interactionList, m_item, m_mustBuild, m_products, FWEventItem::name(), and FWEventItem::size().

Referenced by FWTrackingParticleProxyBuilderFullFramework::build(), FWSimpleProxyBuilder::build(), FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >::build(), FWCaloTowerProxyBuilderBase::build(), FWHFTowerProxyBuilderBase::build(), itemChanged(), setHaveWindow(), and FWSimpleProxyBuilder::visibilityModelChanges().

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  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
162  {
163  TEveProjectionManager *pmgr = (*i)->GetManager();
164  Float_t oldDepth = pmgr->GetCurrentDepth();
165  pmgr->SetCurrentDepth(item()->layer());
166  size_t cnt = 0;
167 
168  TEveElement* projectedAsElement = (*i)->GetProjectedAsElement();
169  TEveElement::List_i parentIt = projectedAsElement->BeginChildren();
170  for (TEveElement::List_i prodIt = elms->BeginChildren(); prodIt != elms->EndChildren(); ++prodIt, ++cnt)
171  {
172  if (cnt < oldSize)
173  {
174  // reused projected holder
175  pmgr->SubImportChildren(*prodIt, *parentIt);
176  ++parentIt;
177  }
178  else if (cnt < itemSize)
179  {
180  // new product holder
181  pmgr->SubImportElements(*prodIt, projectedAsElement);
182  }
183  else
184  {
185  break;
186  }
187  }
188  pmgr->SetCurrentDepth(oldDepth);
189  }
190  }
191 
192 
193  if (m_interactionList && itemSize > oldSize)
194  {
195  TEveElement::List_i elIt = elms->BeginChildren();
196  for (size_t cnt = 0; cnt < itemSize; ++cnt, ++elIt)
197  {
198  if (cnt >= oldSize )
199  m_interactionList->added(*elIt, cnt);
200  }
201  }
202  }
203  }
204  catch (const std::runtime_error& iException)
205  {
206  fwLog(fwlog::kError) << "Caught exception in build function for item " << m_item->name() << ":\n"
207  << iException.what() << std::endl;
208  exit(1);
209  }
210  }
211  m_mustBuild = false;
212 }
virtual void buildViewType(const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
int i
Definition: DBlmapReader.cc:9
std::vector< Product * >::iterator Product_it
std::vector< Product * > m_products
const std::string & name() const
Definition: FWEventItem.cc:500
const FWEventItem * m_item
void added(TEveElement *, unsigned int)
const FWEventItem * item() const
virtual bool haveSingleProduct() const
size_t size() const
Definition: FWEventItem.cc:548
#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 409 of file FWProxyBuilderBase.cc.

Referenced by build().

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

Definition at line 276 of file FWProxyBuilderBase.cc.

References m_item, and FWEventItem::purpose().

277 {
278  if (m_item)
279  return (item.purpose() == m_item->purpose());
280 
281  return false;
282 }
const FWEventItem * m_item
const std::string & purpose() const
Definition: FWEventItem.cc:512
void FWProxyBuilderBase::clean ( )
protectedvirtual

Reimplemented in FWSimpleProxyBuilder, and FWSiStripClusterProxyBuilder.

Definition at line 383 of file FWProxyBuilderBase.cc.

References cleanLocal(), i, and m_products.

Referenced by build().

384 {
385  // Cleans local common element list.
386  for (Product_it i = m_products.begin(); i != m_products.end(); ++i)
387  {
388  if ((*i)->m_elements)
389  (*i)->m_elements->DestroyElements();
390  }
391 
392  cleanLocal();
393 }
int i
Definition: DBlmapReader.cc:9
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 503 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(), FWCandidateProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWGenParticleProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFCandidate3DProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWCandidateLegoProxyBuilder::build(), FWVertexProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWMETProxyBuilder::buildViewType(), FWPFBlockProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWVertexProxyBuilder::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), fireworks::makeRhoZSuperCluster(), FWElectronProxyBuilder::requestCommon(), FWJetProxyBuilder::requestCommon(), FWPFCandidatesLegoProxyBuilder::scaleProduct(), FWCandidateLegoProxyBuilder::scaleProduct(), FWPFPatJetLegoProxyBuilder< T >::scaleProduct(), FWPFClusterLegoProxyBuilder::scaleProduct(), FWPFBlockProxyBuilder::scaleProduct(), FWCaloTowerProxyBuilderBase::setCaloData(), FWTrackProxyBuilderFullFramework::setItem(), FWVertexProxyBuilder::setItem(), FWJetProxyBuilder::setTextPos(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

504 {
505  return m_item->context();
506 }
const FWEventItem * m_item
const fireworks::Context & context() const
Definition: FWEventItem.h:126
TEveCompound * FWProxyBuilderBase::createCompound ( bool  set_color = true,
bool  propagate_color_to_all_children = false 
) const
protected

Definition at line 458 of file FWProxyBuilderBase.cc.

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

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

459 {
460  TEveCompound* c = new TEveCompound();
461  c->CSCTakeAnyParentAsMaster();
462  c->CSCImplySelectAllChildren();
463  c->SetPickable(true);
464  if (set_color)
465  {
466  c->SetMainColor(m_item->defaultDisplayProperties().color());
467  c->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
468  }
469  if (propagate_color_to_all_children)
470  {
471  c->CSCApplyMainColorToAllChildren();
472  c->CSCApplyMainTransparencyToAllChildren();
473  }
474  else
475  {
476  c->CSCApplyMainColorToMatchingChildren();
477  c->CSCApplyMainTransparencyToMatchingChildren();
478  }
479  return c;
480 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:451
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 287 of file FWProxyBuilderBase.cc.

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

Referenced by FWEveViewManager::newItem().

288 {
289  if ( havePerViewProduct(viewType) == false && m_products.empty() == false)
290  {
291  if (haveSingleProduct())
292  {
293  return m_products.back()->m_elements;
294  }
295  else
296  {
297  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
298  {
299  if (viewType == (*i)->m_viewType)
300  return (*i)->m_elements;
301  }
302  }
303  }
304 
305  // printf("new product %s for item %s \n", FWViewType::idToName(viewType).c_str(), item()->name().c_str()); fflush(stdout);
306 
307  Product* product = new Product(viewType, viewContext);
308  m_products.push_back(product);
309  if (viewContext)
310  {
311  product->m_scaleConnection = viewContext->scaleChanged_.connect(boost::bind(&FWProxyBuilderBase::scaleChanged, this, _1));
312  }
313 
314  if (item())
315  {
316  // debug info in eve browser
317  product->m_elements->SetElementName(item()->name().c_str());
318  }
319  return product->m_elements;
320 }
int i
Definition: DBlmapReader.cc:9
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

Definition at line 101 of file FWProxyBuilderBase.h.

References m_haveWindow.

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

101 { return m_haveWindow; }
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 483 of file FWProxyBuilderBase.cc.

References FWEventItem::ModelInfo::displayProperties(), reco::dp, item(), m, siStripFEDMonitor_P5_cff::Min, FWEventItem::modelInfo(), and FWDisplayProperties::transparency().

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

485 {
486  // Helper function to increse transparency of certain components.
487 
489  Char_t transp = TMath::Min(100, transpOffset + (100 - transpOffset) * dp.transparency() / 100);
490  TEveElement::List_t matches;
491  holder->FindChildren(matches, name.c_str());
492  for (TEveElement::List_i m = matches.begin(); m != matches.end(); ++m)
493  {
494  (*m)->SetMainTransparency(transp);
495  }
496 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:67
const FWEventItem * item() const
Char_t transparency() const
auto dp
Definition: deltaR.h:24
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
const FWEventItem* FWProxyBuilderBase::item ( ) const
inline

Definition at line 67 of file FWProxyBuilderBase.h.

References m_item.

Referenced by Vispa.Views.TableView.TableView::_selectedRow(), FWDigitSetProxyBuilder::addBoxSetToProduct(), FWHFTowerProxyBuilderBase::assertCaloDataSlice(), FWCaloTowerProxyBuilderBase::assertCaloDataSlice(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWCaloDataProxyBuilderBase::build(), FWTrackProxyBuilderFullFramework::build(), FWCandidateLegoProxyBuilder::build(), FWVertexProxyBuilder::build(), FWPFEcalClusterRPZProxyBuilder::build(), build(), FWPFHcalClusterRPZProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), FWPhotonProxyBuilder::buildViewType(), FWDTSegmentProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), createProduct(), FWHFTowerProxyBuilderBase::fillCaloData(), FWCaloTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), increaseComponentTransparency(), FWPFCandidateWithHitsProxyBuilder::initPFRecHitsCollections(), FWEveViewManager::itemChanged(), Vispa.Views.TableView.TableView::itemSelectionChanged(), FWBeamSpotProxyBuilder::localModelChanges(), FWPFCandidatesLegoProxyBuilder::localModelChanges(), FWCandidateLegoProxyBuilder::localModelChanges(), FWPFPatJetLegoProxyBuilder< T >::localModelChanges(), FWPFClusterLegoProxyBuilder::localModelChanges(), FWPFEcalRecHitLegoProxyBuilder::localModelChanges(), FWVertexProxyBuilder::localModelChanges(), fireworks::makeRhoPhiSuperCluster(), FWCaloDataProxyBuilderBase::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWEveViewManager::modelChanges(), FWProxyBuilderTemplate< EcalRecHit >::modelData(), FWSimpleProxyBuilderTemplate< l1extra::L1JetParticle >::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, FWCaloTowerProxyBuilderBase, and FWHFTowerProxyBuilderBase.

Definition at line 114 of file FWProxyBuilderBase.cc.

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

Referenced by FWCaloDataProxyBuilderBase::itemBeingDestroyed().

115 {
116  m_item=0;
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 }
int i
Definition: DBlmapReader.cc:9
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 261 of file FWProxyBuilderBase.cc.

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

Referenced by FWEveViewManager::itemChanged().

262 {
263  if (iItem->layer() != m_layer)
264  setProjectionLayer(iItem->layer());
265 
266  if(m_haveWindow) {
267  build();
268  } else {
269  m_mustBuild=true;
270  }
271  m_modelsChanged=false;
272 }
int layer() const
Definition: FWEventItem.cc:457
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 246 of file FWProxyBuilderBase.cc.

References i, m_haveWindow, m_modelsChanged, and m_products.

Referenced by FWEveViewManager::modelChanges().

247 {
248  if(m_haveWindow) {
249  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
250  {
251  modelChanges(iIds, *i);
252  }
253  m_modelsChanged=false;
254  } else {
255  m_modelsChanged=true;
256  }
257 }
int i
Definition: DBlmapReader.cc:9
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 216 of file FWProxyBuilderBase.cc.

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

217 {
218  TEveElementList* elms = p->m_elements;
219  assert(m_item && static_cast<int>(m_item->size()) <= elms->NumChildren() && "can not use default modelChanges implementation");
220 
221  TEveElement::List_i itElement = elms->BeginChildren();
222  int index = 0;
223  for (FWModelIds::const_iterator it = iIds.begin(), itEnd = iIds.end();
224  it != itEnd;
225  ++it,++itElement,++index)
226  {
227  assert(itElement != elms->EndChildren());
228  while (index < it->index())
229  {
230  ++itElement;
231  ++index;
232  assert(itElement != elms->EndChildren());
233  }
234  if (visibilityModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext))
235  {
236  elms->ProjectChild(*itElement);
237  }
238  else
239  {
240  localModelChanges(*it, *itElement, p->m_viewType, p->m_viewContext);
241  }
242  }
243 }
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:548
const FWProxyBuilderBase& FWProxyBuilderBase::operator= ( const FWProxyBuilderBase )
protected
void FWProxyBuilderBase::removePerViewProduct ( FWViewType::EType  type,
const FWViewContext vc 
)

Definition at line 325 of file FWProxyBuilderBase.cc.

References havePerViewProduct(), i, and m_products.

326 {
327  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
328  {
329  if (havePerViewProduct(type) && (*i)->m_viewContext == vc)
330  {
331  if ((*i)->m_elements)
332  (*i)->m_elements->DestroyElements();
333 
334  if ( (*i)->m_viewContext)
335  (*i)->m_scaleConnection.disconnect();
336 
337  delete (*i);
338  m_products.erase(i);
339  break;
340  }
341  }
342 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
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 523 of file FWProxyBuilderBase.cc.

524 {
525  return false;
526 }
void FWProxyBuilderBase::scaleChanged ( const FWViewContext vc)

Definition at line 370 of file FWProxyBuilderBase.cc.

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

Referenced by createProduct().

371 {
372  for (Product_it i = m_products.begin(); i!= m_products.end(); ++i)
373  {
374  if ( havePerViewProduct((*i)->m_viewType) && (*i)->m_viewContext == vc)
375  {
376  scaleProduct((*i)->m_elements, (*i)->m_viewType, (*i)->m_viewContext);
377  }
378  }
379  gEve->Redraw3D();
380 }
int i
Definition: DBlmapReader.cc:9
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 347 of file FWProxyBuilderBase.cc.

References ConfigFiles::l, and m_interactionList.

Referenced by FWEveViewManager::newItem().

348 {
349  // Called if willHandleInteraction() returns false. Purpose ignored by default.
350 
352 }
FWInteractionList * m_interactionList
void FWProxyBuilderBase::setItem ( const FWEventItem iItem)
virtual
void FWProxyBuilderBase::setProjectionLayer ( float  layer)
private

Definition at line 415 of file FWProxyBuilderBase.cc.

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

Referenced by itemChanged().

416 {
417  m_layer = layer;
418  for (Product_it pIt = m_products.begin(); pIt != m_products.end(); ++pIt)
419  {
420  TEveProjectable* pable = static_cast<TEveProjectable*>((*pIt)->m_elements);
421  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
422  (*i)->SetDepth(m_layer);
423  }
424 }
int i
Definition: DBlmapReader.cc:9
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 429 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(), FWTrackTrackingRecHitProxyBuilder::build(), FWPhotonLegoProxyBuilder::build(), FWMuonGlimpseProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWMuonLegoProxyBuilder::build(), FWSimVertexProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWTracksRecHitsProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWBeamSpotProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWTrackingVertexProxyBuilder::build(), FWBeamSpotOnlineProxyBuilder::build(), FWPFTrackRPZProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWPFTrack3DProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWPFClusterRPZProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSecVertexProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWCandidateProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFTrackLegoProxyBuilder::build(), FWGenParticleProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWPFPatJet3DProxyBuilder< T >::build(), FWCandidateLegoProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWVertexProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWElectronGlimpseProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWMuonBuilder::buildMuon(), FWPFRhoPhiRecHit::buildRecHit(), FWTrackProxyBuilderFullFramework::buildTrack(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWPhotonProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), FWDTSegmentProxyBuilder::buildViewType(), FWElectronProxyBuilder::buildViewType(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWConversionProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWJetProxyBuilder::buildViewType(), FWPFLegoRecHit::FWPFLegoRecHit(), fireworks::makeRhoPhiSuperCluster(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFBlockProxyBuilder::setupTrackElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), and FWPFClusterLegoProxyBuilder::sharedBuild().

430 {
431  setupElement(el, color);
432  parent->AddElement(el);
433 }
list parent
Definition: dbtoconf.py:74
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 439 of file FWProxyBuilderBase.cc.

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

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

440 {
441  el->CSCTakeAnyParentAsMaster();
442  el->SetPickable(true);
443 
444  if (color)
445  {
446  el->CSCApplyMainColorToMatchingChildren();
447  el->CSCApplyMainTransparencyToMatchingChildren();
448  el->SetMainColor(m_item->defaultDisplayProperties().color());
449  assert((m_item->defaultDisplayProperties().transparency() >= 0)
450  && (m_item->defaultDisplayProperties().transparency() <= 100));
451  el->SetMainTransparency(m_item->defaultDisplayProperties().transparency());
452  }
453 }
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:451
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 518 of file FWProxyBuilderBase.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

519 {
520  return std::string();
521 }
bool FWProxyBuilderBase::visibilityModelChanges ( const FWModelId ,
TEveElement *  ,
FWViewType::EType  ,
const FWViewContext  
)
protectedvirtual

Reimplemented in FWSimpleProxyBuilder, and FWTrackProxyBuilderFullFramework.

Definition at line 356 of file FWProxyBuilderBase.cc.

Referenced by modelChanges().

357 {
358  return false;
359 }
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 getHaveWindow(), 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