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 | Public Attributes | Private Member Functions | Private Attributes
FWEventItem Class Reference

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

Classes

struct  ModelInfo
 

Public Member Functions

FWModelChangeManagerchangeManager () const
 
FWColorManagercolorManager () const
 
const fireworks::Contextcontext () const
 
const void * data (const std::type_info &) const
 
const FWDisplayPropertiesdefaultDisplayProperties () const
 
void destroy () const
 
const std::string & errorMessage () const
 returns error string if there was a problem this event More...
 
const std::string & filterExpression () const
 
 FWEventItem (fireworks::Context *iContext, unsigned int iItemId, boost::shared_ptr< FWItemAccessorBase > iAccessor, const FWPhysicsObjectDesc &iDesc, const FWConfiguration *pbConf=0)
 
template<class T >
void get (const T *&oData) const
 
FWProxyBuilderConfigurationgetConfig () const
 
const edm::EventBasegetEvent () const
 
const FWGeometrygetGeom () const
 
bool hasError () const
 returns true if failed to get data for this event More...
 
bool hasEvent () const
 
bool haveInterestingValue () const
 
unsigned int id () const
 
bool isCollection () const
 
bool isInBack () const
 returns true if item is behind all other items More...
 
bool isInFront () const
 returns true if item is in front of all other items More...
 
bool itemIsSelected () const
 
int layer () const
 
const void * modelData (int iIndex) const
 
ModelInfo modelInfo (int iIndex) const
 
const std::string & modelInterestingValueAsString (int iIndex) const
 
std::string modelName (int iIndex) const
 
const TClass * modelType () const
 
const std::string & moduleLabel () const
 
void moveToBack ()
 
void moveToFront ()
 
void moveToLayer (int layer)
 
const std::string & name () const
 
const std::string & processName () const
 
const std::string & productInstanceLabel () const
 
void proxyConfigChanged ()
 
const std::string & purpose () const
 
void select (int iIndex) const
 
FWSelectionManagerselectionManager () const
 
void selectItem ()
 
void setDefaultDisplayProperties (const FWDisplayProperties &)
 
void setDisplayProperties (int iIndex, const FWDisplayProperties &) const
 
void setEvent (const edm::EventBase *iEvent)
 
void setFilterExpression (const std::string &)
 
void setLabels (const std::string &iModule, const std::string &iProductInstance, const std::string &iProcess)
 
void setName (const std::string &iName)
 
size_t size () const
 
void toggleSelect (int iIndex) const
 
void toggleSelectItem ()
 
const TClass * type () const
 
void unselect (int iIndex) const
 
void unselectItem ()
 
const FWItemValueGettervalueGetter () const
 one value from the model which is normally used for the popup More...
 
virtual ~FWEventItem ()
 

Static Public Member Functions

static int maxLayerValue ()
 
static int minLayerValue ()
 

Public Attributes

FWModelChangeSignal changed_
 
FWItemChangeSignal defaultDisplayPropertiesChanged_
 
FWItemChangeSignal filterChanged_
 
FWItemChangeSignal goingToBeDestroyed_
 
FWItemChangeSignal itemChanged_
 
FWItemChangeSignal preItemChanged_
 

Private Member Functions

void getPrimaryData () const
 
void handleChange ()
 
void runFilter ()
 
void setData (const edm::ObjectWithDict &) const
 

Private Attributes

boost::shared_ptr
< FWItemAccessorBase
m_accessor
 
const fireworks::Contextm_context
 
FWDisplayProperties m_displayProperties
 
std::string m_errorMessage
 
const edm::EventBasem_event
 
FWModelFilter m_filter
 
unsigned int m_id
 
FWItemValueGetter m_interestingValueGetter
 
bool m_isSelected
 
std::vector< ModelInfom_itemInfos
 
int m_layer
 
std::string m_moduleLabel
 
std::string m_name
 
bool m_printedErrorThisEvent
 
std::string m_processName
 
std::string m_productInstanceLabel
 
FWProxyBuilderConfigurationm_proxyBuilderConfig
 
std::string m_purpose
 
const TClass * m_type
 
edm::TypeWithDict m_wrapperType
 

Detailed Description

Description: Stand in for a top level item in an Event

Usage: <usage>

Definition at line 56 of file FWEventItem.h.

Constructor & Destructor Documentation

FWEventItem::FWEventItem ( fireworks::Context iContext,
unsigned int  iItemId,
boost::shared_ptr< FWItemAccessorBase iAccessor,
const FWPhysicsObjectDesc iDesc,
const FWConfiguration pbConf = 0 
)

Definition at line 52 of file FWEventItem.cc.

References m_accessor, m_filter, m_itemInfos, m_proxyBuilderConfig, modelType(), and FWModelFilter::setClassName().

55  :
56  m_context(iContext),
57  m_id(iId),
58  m_name(iDesc.name()),
59  m_type(iDesc.type()),
60  m_purpose(iDesc.purpose()),
61  m_accessor(iAccessor),
63  m_layer(iDesc.layer()),
64  m_moduleLabel(iDesc.moduleLabel()),
66  m_processName(iDesc.processName()),
67  m_event(0),
68  m_interestingValueGetter(edm::TypeWithDict(*(m_accessor->modelType()->GetTypeInfo())), m_purpose),
69  m_filter(iDesc.filterExpression(),""),
71  m_isSelected(false),
73 {
74  //assert(m_type->GetTypeInfo());
75  //edm::TypeWithDict dataType(*(m_type->GetTypeInfo()));
76  //assert(dataType != edm::TypeWithDict() );
77  //
78  //std::string dataTypeName = dataType.name();
79  //if (dataTypeName[dataTypeName.size() -1] == '>')
80  // dataTypeName += " ";
81  //std::string wrapperName = "edm::Wrapper<" + dataTypeName + ">";
82  //
83  //fwLog(fwlog::kDebug) << "Looking for the wrapper name"
84  // << wrapperName << std::endl;
85  //m_wrapperType = edm::TypeWithDict::byName(wrapperName);
86  //
87  //assert(m_wrapperType != edm::TypeWithDict());
88  if(!m_accessor->isCollection()) {
89  m_itemInfos.reserve(1);
90  }
91  m_filter.setClassName(modelType()->GetName());
93 }
const TClass * m_type
Definition: FWEventItem.h:228
const FWDisplayProperties & displayProperties() const
unsigned int layer() const
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:241
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const fireworks::Context * m_context
Definition: FWEventItem.h:225
const TClass * type() const
std::string m_moduleLabel
Definition: FWEventItem.h:236
unsigned int m_id
Definition: FWEventItem.h:226
const std::string & moduleLabel() const
FWModelFilter m_filter
Definition: FWEventItem.h:243
std::string m_processName
Definition: FWEventItem.h:238
void setClassName(const std::string &)
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:250
const std::string & productInstanceLabel() const
bool m_printedErrorThisEvent
Definition: FWEventItem.h:244
const std::string & processName() const
const std::string & filterExpression() const
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:231
const edm::EventBase * m_event
Definition: FWEventItem.h:239
const std::string & name() const
const TClass * modelType() const
Definition: FWEventItem.cc:561
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
bool m_isSelected
Definition: FWEventItem.h:247
const std::string & purpose() const
std::string m_purpose
Definition: FWEventItem.h:229
std::string m_productInstanceLabel
Definition: FWEventItem.h:237
std::string m_name
Definition: FWEventItem.h:227
FWEventItem::~FWEventItem ( )
virtual

Definition at line 99 of file FWEventItem.cc.

References m_proxyBuilderConfig.

100 {
101  delete m_proxyBuilderConfig;
102 }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:250

Member Function Documentation

FWModelChangeManager* FWEventItem::changeManager ( ) const
inline
FWColorManager* FWEventItem::colorManager ( ) const
inline

Definition at line 137 of file FWEventItem.h.

References fireworks::Context::colorManager(), and m_context.

Referenced by FWCollectionSummaryWidget::colorClicked(), FWCollectionSummaryWidget::createColorPopup(), and FWCollectionSummaryWidget::itemColorClicked().

137  {
138  return m_context->colorManager();
139  }
FWColorManager * colorManager() const
Definition: Context.h:65
const fireworks::Context * m_context
Definition: FWEventItem.h:225
const fireworks::Context& FWEventItem::context ( ) const
inline

Definition at line 126 of file FWEventItem.h.

References m_context.

Referenced by FWCaloDataProxyBuilderBase::build(), FWDetailViewBase::context(), FWProxyBuilderBase::context(), and FWPFCandidateDetailView::voteMaxEtEVal().

126  {
127  return *m_context;
128  }
const fireworks::Context * m_context
Definition: FWEventItem.h:225
const void * FWEventItem::data ( const std::type_info &  iInfo) const

Definition at line 392 of file FWEventItem.cc.

References cppFunctionSkipper::exception, edm::EventBase::getByLabel(), patZpeak::handle, m_accessor, m_errorMessage, m_event, m_moduleLabel, m_printedErrorThisEvent, m_processName, m_productInstanceLabel, m_type, name(), alignCSCRings::s, setData(), GlobalPosition_Frontier_DevDB_cff::tag, and type().

Referenced by cuy.FindIssue::__init__(), get(), FWHandle::getFrom(), and getPrimaryData().

393 {
394  //At the moment this is a programming error
395  assert(iInfo == *(m_type->GetTypeInfo()));
396 
397  //lookup data if we don't already have it
398  if (m_accessor->data())
399  return m_accessor->data();
400 
401  m_errorMessage.clear();
402  if (!m_event)
403  return m_accessor->data();
404 
405  // Retrieve the data from the event.
407  edm::TypeWithDict type(iInfo);
409  try
410  {
412  setData(*handle);
413  }
414  catch (std::exception& iException)
415  {
417  {
418  std::ostringstream s;
419  s << "Failed to get " << name() << " because \n" <<iException.what();
420  m_errorMessage=s.str();
422  }
423  return 0;
424  }
425 
426  return m_accessor->data();
427 }
const TClass * m_type
Definition: FWEventItem.h:228
type
Definition: HCALResponse.h:21
const std::string & name() const
Definition: FWEventItem.cc:500
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
std::string m_moduleLabel
Definition: FWEventItem.h:236
std::string m_processName
Definition: FWEventItem.h:238
const TClass * type() const
Definition: FWEventItem.cc:506
tuple handle
Definition: patZpeak.py:22
void setData(const edm::ObjectWithDict &) const
Definition: FWEventItem.cc:430
bool m_printedErrorThisEvent
Definition: FWEventItem.h:244
const edm::EventBase * m_event
Definition: FWEventItem.h:239
std::string m_errorMessage
Definition: FWEventItem.h:245
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:87
std::string m_productInstanceLabel
Definition: FWEventItem.h:237
const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const
void FWEventItem::destroy ( ) const

Definition at line 608 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), goingToBeDestroyed_, id(), cmsHarvester::index, m_itemInfos, selectionManager(), size(), FWSelectionManager::unselect(), and unselectItem().

Referenced by FWEventItemsManager::clearItems(), and CmsShowEDI::removeItem().

609 {
610  //NOTE: need to unselect first before announcing destruction
611  // because some items are listening to the display change and may
612  // not properly release their connection to that signal after they
613  // are destroyed via a connection to goingToBeDestroyed_
614  const_cast<FWEventItem*>(this)->unselectItem();
615  {
616  FWChangeSentry sentry(*(changeManager()));
617 
618  for(int index=0; index <static_cast<int>(size()); ++index) {
619  if(m_itemInfos.at(index).m_isSelected) {
620  FWModelId id(this,index);
621  selectionManager()->unselect(id);
622  changeManager()->changed(id);
623  }
624  }
625  }
626  goingToBeDestroyed_(this);
627  delete this;
628 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:214
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:548
void unselectItem()
Definition: FWEventItem.cc:641
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
const std::string & FWEventItem::errorMessage ( ) const

returns error string if there was a problem this event

Definition at line 672 of file FWEventItem.cc.

References getPrimaryData(), and m_errorMessage.

Referenced by Vispa.Main.Application.Application::_loadPlugins(), hasError(), FWCollectionSummaryWidget::itemChanged(), Vispa.Main.Application.Application::openFile(), and ConfigToolBase.ConfigToolBase::typeError().

673 {
674  if(m_errorMessage.empty()) {
675  getPrimaryData();
676  }
677  return m_errorMessage;
678 }
void getPrimaryData() const
Definition: FWEventItem.cc:443
std::string m_errorMessage
Definition: FWEventItem.h:245
const std::string & FWEventItem::filterExpression ( ) const

Definition at line 602 of file FWEventItem.cc.

References FWModelFilter::expression(), and m_filter.

Referenced by CmsShowEDI::fillEDIFrame(), FWCollectionSummaryWidget::itemChanged(), and CmsShowEDI::updateFilter().

603 {
604  return m_filter.expression();
605 }
const std::string & expression() const
FWModelFilter m_filter
Definition: FWEventItem.h:243
template<class T >
void FWEventItem::get ( const T *&  oData) const
inline

Definition at line 84 of file FWEventItem.h.

References data().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), FWPFCandidateWithHitsProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWPFCandidateTowerProxyBuilder::build(), FWCaloTowerProxyBuilderBase::build(), FWTrackProxyBuilderFullFramework::build(), FWHFTowerProxyBuilderBase::build(), FWGEMPadDigiProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), FWHFTowerSliceSelector::doSelect(), FWHFTowerSliceSelector::doUnselect(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), FWPFCandidateTowerSliceSelector::getItemEntryEtaPhi(), FWCaloTowerSliceSelector::getItemEntryEtaPhi(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

84  {
85  oData=reinterpret_cast<const T*>(data(typeid(T)));
86  }
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:392
long double T
FWProxyBuilderConfiguration* FWEventItem::getConfig ( ) const
inline
const edm::EventBase* FWEventItem::getEvent ( ) const
inline
const FWGeometry * FWEventItem::getGeom ( ) const

Definition at line 681 of file FWEventItem.cc.

References fireworks::Context::getGeom(), and m_context.

Referenced by FWTrackHitsDetailView::addModules(), FWConvTrackHitsDetailView::addModules(), fireworks::addSiStripClusters(), FWPRCaloTowerProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTrajectorySeedProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWGEMPadDigiProxyBuilder::build(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), FWPhotonProxyBuilder::buildViewType(), FWDTSegmentProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), FWHFTowerSliceSelector::findBinFromId(), fireworks::pushNearbyPixelHits(), fireworks::pushPixelHits(), FWCaloRecHitDigitSetProxyBuilder::scaleProduct(), and FWPFCandidateWithHitsProxyBuilder::scaleProduct().

681  {
682  return m_context->getGeom();
683 }
const FWGeometry * getGeom() const
Definition: Context.h:83
const fireworks::Context * m_context
Definition: FWEventItem.h:225
void FWEventItem::getPrimaryData ( ) const
private

Definition at line 443 of file FWEventItem.cc.

References data(), m_accessor, and m_type.

Referenced by errorMessage(), handleChange(), modelData(), modelInfo(), modelInterestingValueAsString(), FWFileEntry::runFilter(), and size().

444 {
445  //if(0!=m_data) return;
446  if(0!=m_accessor->data()) return;
447  this->data(*(m_type->GetTypeInfo()));
448 }
const TClass * m_type
Definition: FWEventItem.h:228
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:392
void FWEventItem::handleChange ( )
private

Definition at line 378 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), getPrimaryData(), preItemChanged_, and runFilter().

Referenced by moveToBack(), moveToFront(), moveToLayer(), proxyConfigChanged(), setEvent(), and setLabels().

379 {
380  preItemChanged_(this);
381  FWChangeSentry sentry(*(this->changeManager()));
382  //want filter to rerun after all changes have been made
383  changeManager()->changed(this);
384  getPrimaryData();
385  runFilter();
386 }
FWItemChangeSignal preItemChanged_
Definition: FWEventItem.h:203
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
void getPrimaryData() const
Definition: FWEventItem.cc:443
void changed(const FWModelId &)
void runFilter()
Definition: FWEventItem.cc:207
bool FWEventItem::hasError ( void  ) const

returns true if failed to get data for this event

Definition at line 667 of file FWEventItem.cc.

References errorMessage().

Referenced by FWCollectionSummaryWidget::itemChanged().

667  {
668  return !errorMessage().empty();
669 }
const std::string & errorMessage() const
returns error string if there was a problem this event
Definition: FWEventItem.cc:672
bool FWEventItem::hasEvent ( ) const
inline

Definition at line 141 of file FWEventItem.h.

References m_event.

141  {
142  return 0 != m_event;
143  }
const edm::EventBase * m_event
Definition: FWEventItem.h:239
bool FWEventItem::haveInterestingValue ( ) const

Definition at line 587 of file FWEventItem.cc.

Referenced by FWInteractionList::added(), and FWInteractionList::itemChanged().

588 {
589  return true; //m_interestingValueGetter.isValid();
590 }
unsigned int FWEventItem::id ( void  ) const
bool FWEventItem::isCollection ( ) const

Definition at line 555 of file FWEventItem.cc.

References m_accessor.

556 {
557  return m_accessor->isCollection();
558 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
bool FWEventItem::isInBack ( ) const

returns true if item is behind all other items

Definition at line 478 of file FWEventItem.cc.

References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), layer(), and m_context.

Referenced by CmsShowEDI::updateLayerControls().

479 {
480  assert(0!=m_context->eventItemsManager());
482  itEnd = m_context->eventItemsManager()->end();
483  it != itEnd;
484  ++it) {
485  if((*it) && (*it != this) && (*it)->layer() <= layer()) {
486  return false;
487  }
488  }
489  return true;
490 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:225
int layer() const
Definition: FWEventItem.cc:457
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
bool FWEventItem::isInFront ( ) const

returns true if item is in front of all other items

Definition at line 463 of file FWEventItem.cc.

References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), layer(), and m_context.

Referenced by CmsShowEDI::updateLayerControls().

464 {
465  assert(0!=m_context->eventItemsManager());
467  itEnd = m_context->eventItemsManager()->end();
468  it != itEnd;
469  ++it) {
470  if((*it) && (*it != this) && (*it)->layer() >= layer()) {
471  return false;
472  }
473  }
474  return true;
475 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:225
int layer() const
Definition: FWEventItem.cc:457
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
bool FWEventItem::itemIsSelected ( ) const
int FWEventItem::layer ( ) const

objects with a larger layer number are drawn on top of objects with a lower number

Definition at line 457 of file FWEventItem.cc.

References m_layer.

Referenced by addElements(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), isInBack(), isInFront(), FWProxyBuilderBase::itemChanged(), FWProxyBuilderBase::layer(), moveToBack(), moveToFront(), and CmsShowEDI::updateLayerControls().

458 {
459  return m_layer;
460 }
int FWEventItem::maxLayerValue ( )
static

Definition at line 43 of file FWEventItem.cc.

Referenced by CmsShowEDI::CmsShowEDI(), moveToFront(), and moveToLayer().

44 {
45  return 100;
46 }
int FWEventItem::minLayerValue ( )
static

Definition at line 38 of file FWEventItem.cc.

Referenced by CmsShowEDI::CmsShowEDI(), moveToBack(), and moveToLayer().

39 {
40  return -100;
41 }
const void * FWEventItem::modelData ( int  iIndex) const
FWEventItem::ModelInfo FWEventItem::modelInfo ( int  iIndex) const

Definition at line 535 of file FWEventItem.cc.

References getPrimaryData(), FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and edmStreamStallGrapher::t.

Referenced by FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWPFEcalClusterRPZProxyBuilder::build(), FWPFHcalClusterRPZProxyBuilder::build(), FWSimpleProxyBuilder::buildViewType(), FWCollectionSummaryTableManager::buttonReleasedInRowHeader(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWFromSliceSelector::clear(), FWCollectionSummaryWidget::colorChangeRequested(), FWTableViewTableManager::dataChanged(), FWHistSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWModelIdFromEveSelector::doSelect(), FWHistSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWModelIdFromEveSelector::doUnselect(), FWCandidateTowerProxyBuilder::fillCaloData(), FWPFCandidateTowerProxyBuilder::fillCaloData(), FWCaloTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillCaloData(), CmsShowModelPopup::fillModelPopup(), FWProxyBuilderBase::increaseComponentTransparency(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), FWBeamSpotProxyBuilder::localModelChanges(), FWPFCandidatesLegoProxyBuilder::localModelChanges(), FWCandidateLegoProxyBuilder::localModelChanges(), FWPFPatJetLegoProxyBuilder< T >::localModelChanges(), FWPFClusterLegoProxyBuilder::localModelChanges(), FWPFEcalRecHitLegoProxyBuilder::localModelChanges(), FWInteractionList::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWTableViewTableManager::rowHeader(), FWModelExpressionSelector::select(), FWCollectionSummaryModelCellRenderer::setData(), FWSecondarySelectableSelector::syncSelection(), FWTrackProxyBuilderFullFramework::visibilityModelChanges(), and FWSimpleProxyBuilder::visibilityModelChanges().

536 {
537  getPrimaryData();
539  return m_itemInfos.at(iIndex);
540  }
541  FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties());
542  dp.setIsVisible(false);
543  ModelInfo t(dp,m_itemInfos.at(iIndex).isSelected());
544  return t;
545 }
void getPrimaryData() const
Definition: FWEventItem.cc:443
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:231
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void setIsVisible(bool iSet)
const std::string & FWEventItem::modelInterestingValueAsString ( int  iIndex) const

Definition at line 594 of file FWEventItem.cc.

References getPrimaryData(), FWItemValueGetter::getToolTip(), m_accessor, and m_interestingValueGetter.

Referenced by FWInteractionList::added(), FWDigitSetProxyBuilder::getTooltip(), and FWInteractionList::itemChanged().

595 {
596  getPrimaryData();
597  return m_interestingValueGetter.getToolTip(m_accessor->modelData(iIndex));
598 }
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:241
void getPrimaryData() const
Definition: FWEventItem.cc:443
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const std::string & getToolTip(const void *iObject) const
std::string FWEventItem::modelName ( int  iIndex) const

Definition at line 574 of file FWEventItem.cc.

References name(), and alignCSCRings::s.

Referenced by FWInteractionList::added(), CmsShowModelPopup::fillModelPopup(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), and FWCollectionSummaryModelCellRenderer::setData().

575 {
576  std::ostringstream s;
577  size_t lastChar = name().size();
578  //if name ends in 's' assume it is plural and remove the s for the individual object
579  if(name()[lastChar-1]=='s') {
580  --lastChar;
581  }
582  s<<name().substr(0,lastChar)<<" "<<iIndex;
583  return s.str();
584 }
const std::string & name() const
Definition: FWEventItem.cc:500
const TClass * FWEventItem::modelType ( ) const
const std::string & FWEventItem::moduleLabel ( ) const

Definition at line 518 of file FWEventItem.cc.

References m_moduleLabel.

Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().

519 {
520  return m_moduleLabel;
521 }
std::string m_moduleLabel
Definition: FWEventItem.h:236
void FWEventItem::moveToBack ( )

Definition at line 333 of file FWEventItem.cc.

References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), handleChange(), layer(), m_accessor, m_context, m_itemInfos, m_layer, bookConverter::max, and minLayerValue().

Referenced by CmsShowEDI::moveToBack().

334 {
335  assert(0!=m_context->eventItemsManager());
336  int smallest = layer();
338  itEnd = m_context->eventItemsManager()->end();
339  it != itEnd;
340  ++it) {
341  if((*it) && (*it != this) && (*it)->layer() < smallest) {
342  smallest= (*it)->layer();
343  }
344  }
345 
346  if(smallest <= layer()) {
347  m_layer = std::max(smallest-1, minLayerValue());
348  }
349 
350  m_itemInfos.clear();
351  m_accessor->reset();
352  handleChange();
353 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const fireworks::Context * m_context
Definition: FWEventItem.h:225
int layer() const
Definition: FWEventItem.cc:457
static int minLayerValue()
Definition: FWEventItem.cc:38
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
void handleChange()
Definition: FWEventItem.cc:378
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
void FWEventItem::moveToFront ( )

change layering

Definition at line 310 of file FWEventItem.cc.

References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), handleChange(), layer(), m_accessor, m_context, m_itemInfos, m_layer, maxLayerValue(), and min().

Referenced by CmsShowEDI::moveToFront().

311 {
312  assert(0!=m_context->eventItemsManager());
313  int largest = layer();
315  itEnd = m_context->eventItemsManager()->end();
316  it != itEnd;
317  ++it) {
318  if ((*it) && (*it != this) && (*it)->layer() > largest) {
319  largest= (*it)->layer();
320  }
321  }
322 
323  if(largest >= layer()) {
324  m_layer = std::min(largest+1, maxLayerValue());
325  }
326 
327  m_itemInfos.clear();
328  m_accessor->reset();
329  handleChange();
330 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const fireworks::Context * m_context
Definition: FWEventItem.h:225
static int maxLayerValue()
Definition: FWEventItem.cc:43
int layer() const
Definition: FWEventItem.cc:457
T min(T a, T b)
Definition: MathUtil.h:58
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
void handleChange()
Definition: FWEventItem.cc:378
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
void FWEventItem::moveToLayer ( int  layer)

Definition at line 356 of file FWEventItem.cc.

References fireworks::Context::eventItemsManager(), handleChange(), m_accessor, m_context, m_itemInfos, m_layer, bookConverter::max, maxLayerValue(), min(), and minLayerValue().

Referenced by CmsShowEDI::moveToLayer().

357 {
358  assert(0!=m_context->eventItemsManager());
359 
361 
362  m_itemInfos.clear();
363  m_accessor->reset();
364  handleChange();
365 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const fireworks::Context * m_context
Definition: FWEventItem.h:225
static int maxLayerValue()
Definition: FWEventItem.cc:43
int layer() const
Definition: FWEventItem.cc:457
T min(T a, T b)
Definition: MathUtil.h:58
static int minLayerValue()
Definition: FWEventItem.cc:38
void handleChange()
Definition: FWEventItem.cc:378
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
const std::string & FWEventItem::name ( void  ) const
const std::string & FWEventItem::processName ( ) const

Definition at line 529 of file FWEventItem.cc.

References m_processName.

Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().

530 {
531  return m_processName;
532 }
std::string m_processName
Definition: FWEventItem.h:238
const std::string & FWEventItem::productInstanceLabel ( ) const

Definition at line 523 of file FWEventItem.cc.

References m_productInstanceLabel.

Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().

524 {
525  return m_productInstanceLabel;
526 }
std::string m_productInstanceLabel
Definition: FWEventItem.h:237
void FWEventItem::proxyConfigChanged ( )

Definition at line 368 of file FWEventItem.cc.

References fireworks::Context::eventItemsManager(), handleChange(), m_accessor, m_context, and m_itemInfos.

Referenced by FWProxyBuilderConfiguration::assertParam().

369 {
370  m_itemInfos.clear();
371  m_accessor->reset();
373  handleChange();
374 
375 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
const fireworks::Context * m_context
Definition: FWEventItem.h:225
void handleChange()
Definition: FWEventItem.cc:378
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
const std::string & FWEventItem::purpose ( ) const

Since the same C++ type can be used for multiple purposes, this string disambiguates them.

Definition at line 512 of file FWEventItem.cc.

References m_purpose.

Referenced by FWProxyBuilderBase::canHandle(), and FWEveViewManager::newItem().

513 {
514  return m_purpose;
515 }
std::string m_purpose
Definition: FWEventItem.h:229
void FWEventItem::runFilter ( )
private

Definition at line 207 of file FWEventItem.cc.

References dtNoiseDBValidation_cfg::cerr, FWModelChangeManager::changed(), changeManager(), cppFunctionSkipper::exception, id(), cmsHarvester::index, m_accessor, m_filter, m_itemInfos, name(), FWModelFilter::passesFilter(), and size().

Referenced by handleChange(), and setFilterExpression().

208 {
209  if(m_accessor->isCollection() && m_accessor->data()) {
210  //std::cout <<"runFilter"<<std::endl;
211  FWChangeSentry sentry(*(this->changeManager()));
212  int size = m_accessor->size();
213  std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin();
214  try {
215  for(int index = 0; index != size; ++index,++itInfo) {
216  bool changed = false;
217  bool wasVisible = itInfo->m_displayProperties.isVisible();
218  if(not m_filter.passesFilter(m_accessor->modelData(index))) {
219  itInfo->m_displayProperties.setIsVisible(false);
220  changed = wasVisible==true;
221  } else {
222  itInfo->m_displayProperties.setIsVisible(true);
223  changed = wasVisible==false;
224  }
225  if(changed) {
226  FWModelId id(this,index);
227  changeManager()->changed(id);
228  }
229  }
230  } catch( const std::exception& iException) {
231  //Should log this error
232  std::cerr <<"Exception occurred while running filter on "<<name()<<"\n"
233  <<iException.what()<<std::endl;
234  }
235  }
236 }
bool passesFilter(const void *) const
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
const std::string & name() const
Definition: FWEventItem.cc:500
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
FWModelFilter m_filter
Definition: FWEventItem.h:243
unsigned int id() const
Definition: FWEventItem.cc:494
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:548
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::select ( int  iIndex) const

Definition at line 250 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, EgammaValidation_Wenu_cff::sel, FWSelectionManager::select(), selectionManager(), and selectItem().

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), FWHistSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), Vispa.Views.AbstractView.AbstractView::restoreSelection(), FWModelExpressionSelector::select(), FWModelId::select(), CmsShowEDI::selectAll(), and FWSecondarySelectableSelector::syncSelection().

251 {
252  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
253  if(not sel) {
254  sel = true;
255  FWModelId id(this,iIndex);
256  selectionManager()->select(id);
257  //want to make it obvious what type of object was selected
258  // therefore we also select the item
259  const_cast<FWEventItem*>(this)->selectItem();
260  changeManager()->changed(id);
261  }
262 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:494
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
void changed(const FWModelId &)
void selectItem()
Definition: FWEventItem.cc:632
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
FWSelectionManager* FWEventItem::selectionManager ( ) const
inline
void FWEventItem::selectItem ( )

Select the item (i.e. container) itself

Definition at line 632 of file FWEventItem.cc.

References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), and FWSelectionManager::selectItem().

Referenced by FWCollectionSummaryWidget::infoClicked(), FWCollectionSummaryWidget::labelClicked(), select(), and FWCollectionSummaryWidget::stateClicked().

633 {
634  if(!m_isSelected) {
635  m_isSelected=true;
636  selectionManager()->selectItem(this);
638  }
639 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:207
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
bool m_isSelected
Definition: FWEventItem.h:247
void selectItem(FWEventItem *)
void FWEventItem::setData ( const edm::ObjectWithDict iData) const
private

Definition at line 430 of file FWEventItem.cc.

References m_accessor, m_displayProperties, and m_itemInfos.

Referenced by data().

431 {
432  m_accessor->setData(iData);
433  //std::cout <<"size "<<m_accessor->size()<<std::endl;
434  if(m_accessor->isCollection()) {
435  m_itemInfos.reserve(m_accessor->size());
436  m_itemInfos.resize(m_accessor->size(),ModelInfo(m_displayProperties,false));
437  } else {
438  m_itemInfos.push_back(ModelInfo(m_displayProperties,false));
439  }
440 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:231
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::setDefaultDisplayProperties ( const FWDisplayProperties iProp)

This is the place where not only display properties are changed, but which is also responsible to notify the FWModelChangeManager about the change. If you've just added some property, you have a nice GUI for it and still nothing works, this is probably the place where you want to look.

Definition at line 155 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), FWDisplayProperties::color(), defaultDisplayPropertiesChanged_, id(), cmsHarvester::index, FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, FWDisplayProperties::setColor(), FWDisplayProperties::setTransparency(), size(), and FWDisplayProperties::transparency().

Referenced by CmsShowEDI::changeItemColor(), CmsShowEDI::changeItemOpacity(), FWCollectionSummaryWidget::colorChangeRequested(), FWCollectionSummaryWidget::toggleItemVisible(), and CmsShowEDI::toggleItemVisible().

156 {
157  bool visChange = m_displayProperties.isVisible() != iProp.isVisible();
158  bool colorChanged = m_displayProperties.color() != iProp.color();
159  bool transparencyChanged = m_displayProperties.transparency() != iProp.transparency();
160 
161  if(!visChange && !colorChanged && !transparencyChanged) {
162  return;
163  }
164  //If the default visibility is changed, we want to also change the the visibility of the children
165  // BUT we want to remember the old visibility so if the visibility is changed again we return
166  // to the previous state.
167  // only the visible ones need to be marked as 'changed'
168  FWChangeSentry sentry(*(changeManager()));
169 
170  for(int index=0; index <static_cast<int>(size()); ++index) {
171  FWDisplayProperties prp = m_itemInfos[index].displayProperties();
172  bool vis=prp.isVisible();
173  bool changed = false;
174  changed = visChange && vis;
175 
176  if(colorChanged) {
177  if(m_displayProperties.color()==prp.color()) {
178  prp.setColor(iProp.color());
179  changed = true;
180  }
181  }
182  if (transparencyChanged) {
184  prp.setTransparency(iProp.transparency());
185  changed = true;
186  }
187  }
188  if(changed) {
189  m_itemInfos[index].m_displayProperties=prp;
190  FWModelId id(this,index);
191  changeManager()->changed(id);
192  }
193  }
194  m_displayProperties= iProp;
196 }
void setColor(Color_t iColor)
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:207
Color_t color() const
Char_t transparency() const
unsigned int id() const
Definition: FWEventItem.cc:494
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:548
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:231
void setTransparency(Char_t transparency)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::setDisplayProperties ( int  iIndex,
const FWDisplayProperties iProps 
) const

Definition at line 276 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), defaultDisplayPropertiesChanged_, id(), cmsHarvester::index, FWDisplayProperties::isVisible(), m_accessor, m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and size().

Referenced by FWCollectionSummaryTableManager::buttonReleasedInRowHeader(), CmsShowEDI::changeSelectionColor(), FWCollectionSummaryWidget::colorChangeRequested(), and FWModelExpressionSelector::select().

277 {
278  FWDisplayProperties& prop = m_itemInfos.at(iIndex).m_displayProperties;
280  if( prop
281  != iProps ) {
282  prop = iProps;
283  FWModelId id(this,iIndex);
284  //selectionManager()->select(id);
285  changeManager()->changed(id);
286  }
287  } else {
288  if(iProps.isVisible()) {
289  FWChangeSentry sentry(*(this->changeManager()));
290  int size = m_accessor->size();
291  std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin();
292  for(int index = 0; index != size; ++index,++itInfo) {
293  if( itInfo->m_displayProperties.isVisible() ) {
294  itInfo->m_displayProperties.setIsVisible(false);
295  FWModelId id(this,index);
296  changeManager()->changed(id);
297  }
298  }
299  m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(true);
300  FWModelId id(this,iIndex);
301  changeManager()->changed(id);
302  const_cast<FWEventItem*>(this)->m_displayProperties.setIsVisible(true);
303  //NOTE: need to send out a signal here
305  }
306  }
307 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:207
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
unsigned int id() const
Definition: FWEventItem.cc:494
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:548
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:231
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void setIsVisible(bool iSet)
void FWEventItem::setEvent ( const edm::EventBase iEvent)

Definition at line 120 of file FWEventItem.cc.

References handleChange(), iEvent, m_accessor, m_event, m_itemInfos, and m_printedErrorThisEvent.

Referenced by FWEventItemsManager::newEvent().

121 {
122  m_printedErrorThisEvent = false;
123  m_event = iEvent;
124  m_accessor->reset();
125  m_itemInfos.clear();
126  handleChange();
127 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
int iEvent
Definition: GenABIO.cc:230
bool m_printedErrorThisEvent
Definition: FWEventItem.h:244
void handleChange()
Definition: FWEventItem.cc:378
const edm::EventBase * m_event
Definition: FWEventItem.h:239
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::setFilterExpression ( const std::string &  iExpression)

Throws an FWExpresionException if there is a problem with the expression

Definition at line 199 of file FWEventItem.cc.

References filterChanged_, m_filter, runFilter(), and FWModelFilter::setExpression().

Referenced by CmsShowEDI::runFilter().

200 {
201  m_filter.setExpression(iExpression);
202  filterChanged_(this);
203  runFilter();
204 }
FWModelFilter m_filter
Definition: FWEventItem.h:243
void setExpression(const std::string &)
void runFilter()
Definition: FWEventItem.cc:207
FWItemChangeSignal filterChanged_
Definition: FWEventItem.h:210
void FWEventItem::setLabels ( const std::string &  iModule,
const std::string &  iProductInstance,
const std::string &  iProcess 
)

Definition at line 130 of file FWEventItem.cc.

References handleChange(), m_accessor, m_itemInfos, m_moduleLabel, m_processName, and m_productInstanceLabel.

133 {
134  m_moduleLabel = iModule;
135  m_productInstanceLabel = iProductInstance;
136  m_processName = iProcess;
137  m_accessor->reset();
138  m_itemInfos.clear();
139  handleChange();
140 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:230
std::string m_moduleLabel
Definition: FWEventItem.h:236
std::string m_processName
Definition: FWEventItem.h:238
void handleChange()
Definition: FWEventItem.cc:378
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
std::string m_productInstanceLabel
Definition: FWEventItem.h:237
void FWEventItem::setName ( const std::string &  iName)

Definition at line 143 of file FWEventItem.cc.

References m_name.

Referenced by Vispa.Gui.PortWidget.PortWidget::__init__(), and Vispa.Views.PropertyView.Property::__init__().

144 {
145  m_name = iName;
146 }
std::string m_name
Definition: FWEventItem.h:227
size_t FWEventItem::size ( void  ) const

Definition at line 548 of file FWEventItem.cc.

References getPrimaryData(), and m_itemInfos.

Referenced by FWCaloRecHitDigitSetProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWProxyBuilderBase::build(), FWSimpleProxyBuilder::buildViewType(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWFromSliceSelector::clear(), FWCollectionSummaryTableManager::dataChanged(), FWTableViewTableManager::dataChanged(), CmsShowEDI::deselectAll(), destroy(), FWHistSliceSelector::doSelect(), FWHistSliceSelector::doUnselect(), FWCandidateTowerProxyBuilder::fillCaloData(), FWInteractionList::itemChanged(), FWInteractionList::modelChanges(), FWProxyBuilderBase::modelChanges(), FWTableViewTableManager::numberOfRows(), FWCollectionSummaryTableManager::numberOfRows(), FWConversionProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), FWJetProxyBuilder::requestCommon(), FWCollectionSummaryTableManager::rowHeader(), FWTableViewTableManager::rowHeader(), runFilter(), FWCaloRecHitDigitSetProxyBuilder::scaleProduct(), FWModelExpressionSelector::select(), CmsShowEDI::selectAll(), setDefaultDisplayProperties(), setDisplayProperties(), and FWSecondarySelectableSelector::syncSelection().

549 {
550  getPrimaryData();
551  return m_itemInfos.size();
552 }
void getPrimaryData() const
Definition: FWEventItem.cc:443
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::toggleSelect ( int  iIndex) const

Definition at line 264 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, EgammaValidation_Wenu_cff::sel, FWSelectionManager::select(), selectionManager(), and FWSelectionManager::unselect().

Referenced by FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), and FWModelId::toggleSelect().

265 {
266  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
267  sel = not sel;
268  FWModelId id(this,iIndex);
269  if (sel)
270  selectionManager()->select(id);
271  else selectionManager()->unselect(id);
272  changeManager()->changed(id);
273 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::toggleSelectItem ( )

Definition at line 650 of file FWEventItem.cc.

References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), FWSelectionManager::selectItem(), and FWSelectionManager::unselectItem().

651 {
653  if(m_isSelected) {
654  selectionManager()->selectItem(this);
655  }else {
657  }
659 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:207
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
bool m_isSelected
Definition: FWEventItem.h:247
void selectItem(FWEventItem *)
const TClass * FWEventItem::type ( ) const
void FWEventItem::unselect ( int  iIndex) const

Definition at line 239 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, EgammaValidation_Wenu_cff::sel, selectionManager(), and FWSelectionManager::unselect().

Referenced by FWFromSliceSelector::clear(), CmsShowEDI::deselectAll(), FWHistSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWSecondarySelectableSelector::syncSelection(), and FWModelId::unselect().

240 {
241  //check if this is a change
242  if(bool& sel = m_itemInfos.at(iIndex).m_isSelected) {
243  sel=false;
244  FWModelId id(this,iIndex);
245  selectionManager()->unselect(id);
246  changeManager()->changed(id);
247  }
248 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:130
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:233
void FWEventItem::unselectItem ( )

Definition at line 641 of file FWEventItem.cc.

References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), and FWSelectionManager::unselectItem().

Referenced by destroy().

642 {
643  if(m_isSelected) {
644  m_isSelected=false;
647  }
648 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:207
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:133
bool m_isSelected
Definition: FWEventItem.h:247
const FWItemValueGetter& FWEventItem::valueGetter ( ) const
inline

Member Data Documentation

FWModelChangeSignal FWEventItem::changed_
mutable

connect to this signal if you want to know when models held by the item change

Definition at line 195 of file FWEventItem.h.

Referenced by CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), FWEveViewManager::newItem(), and FWModelChangeManager::newItemSlot().

FWItemChangeSignal FWEventItem::defaultDisplayPropertiesChanged_
mutable

connect to this signal if you want to know that the default display properties of the item have changed. This is only useful if you are displaying these properties and not just the underlying models.

Definition at line 207 of file FWEventItem.h.

Referenced by CmsShowEDI::fillEDIFrame(), FWCollectionSummaryWidget::FWCollectionSummaryWidget(), selectItem(), setDefaultDisplayProperties(), setDisplayProperties(), toggleSelectItem(), and unselectItem().

FWItemChangeSignal FWEventItem::filterChanged_
mutable

connect to this signal if you want to know that the filter being applied to the item was changed.

Definition at line 210 of file FWEventItem.h.

Referenced by FWCollectionSummaryWidget::FWCollectionSummaryWidget(), and setFilterExpression().

FWItemChangeSignal FWEventItem::goingToBeDestroyed_
mutable

connect to this signal if you need to know that this item is going to be destroyed.

Definition at line 214 of file FWEventItem.h.

Referenced by destroy(), CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWTableViewManager::newItem(), FWEveViewManager::newItem(), FWSummaryManager::newItem(), and FWViewManagerManager::registerEventItem().

FWItemChangeSignal FWEventItem::itemChanged_
mutable
boost::shared_ptr<FWItemAccessorBase> FWEventItem::m_accessor
private
const fireworks::Context* FWEventItem::m_context
private
FWDisplayProperties FWEventItem::m_displayProperties
private
std::string FWEventItem::m_errorMessage
mutableprivate

Definition at line 245 of file FWEventItem.h.

Referenced by data(), and errorMessage().

const edm::EventBase* FWEventItem::m_event
private

Definition at line 239 of file FWEventItem.h.

Referenced by data(), getEvent(), hasEvent(), FWFileEntry::runFilter(), and setEvent().

FWModelFilter FWEventItem::m_filter
private

Definition at line 243 of file FWEventItem.h.

Referenced by filterExpression(), FWEventItem(), runFilter(), and setFilterExpression().

unsigned int FWEventItem::m_id
private

Definition at line 226 of file FWEventItem.h.

Referenced by id().

FWItemValueGetter FWEventItem::m_interestingValueGetter
private

Definition at line 241 of file FWEventItem.h.

Referenced by modelInterestingValueAsString(), and valueGetter().

bool FWEventItem::m_isSelected
private

Definition at line 247 of file FWEventItem.h.

Referenced by itemIsSelected(), selectItem(), toggleSelectItem(), and unselectItem().

std::vector<ModelInfo> FWEventItem::m_itemInfos
mutableprivate
int FWEventItem::m_layer
private

Definition at line 232 of file FWEventItem.h.

Referenced by layer(), moveToBack(), moveToFront(), and moveToLayer().

std::string FWEventItem::m_moduleLabel
private

Definition at line 236 of file FWEventItem.h.

Referenced by data(), moduleLabel(), and setLabels().

std::string FWEventItem::m_name
private

Definition at line 227 of file FWEventItem.h.

Referenced by name(), and setName().

bool FWEventItem::m_printedErrorThisEvent
mutableprivate

Definition at line 244 of file FWEventItem.h.

Referenced by data(), and setEvent().

std::string FWEventItem::m_processName
private

Definition at line 238 of file FWEventItem.h.

Referenced by data(), processName(), and setLabels().

std::string FWEventItem::m_productInstanceLabel
private

Definition at line 237 of file FWEventItem.h.

Referenced by data(), productInstanceLabel(), and setLabels().

FWProxyBuilderConfiguration* FWEventItem::m_proxyBuilderConfig
private

Definition at line 250 of file FWEventItem.h.

Referenced by FWEventItem(), getConfig(), and ~FWEventItem().

std::string FWEventItem::m_purpose
private

Definition at line 229 of file FWEventItem.h.

Referenced by purpose().

const TClass* FWEventItem::m_type
private

Definition at line 228 of file FWEventItem.h.

Referenced by data(), getPrimaryData(), and type().

edm::TypeWithDict FWEventItem::m_wrapperType
private

Definition at line 240 of file FWEventItem.h.

FWItemChangeSignal FWEventItem::preItemChanged_
mutable

connect to this signal if you want to know immediately when the data underlying the item changes only intended to be used by the FWSelectionManager

Definition at line 203 of file FWEventItem.h.

Referenced by handleChange(), and FWSelectionManager::select().