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 Reflex::Object &) 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
 
Reflex::Type m_wrapperType
 

Detailed Description

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

Usage: <usage>

Definition at line 57 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 53 of file FWEventItem.cc.

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

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

Definition at line 100 of file FWEventItem.cc.

References m_proxyBuilderConfig.

101 {
102  delete m_proxyBuilderConfig;
103 }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:251

Member Function Documentation

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

Definition at line 138 of file FWEventItem.h.

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

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

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

Definition at line 127 of file FWEventItem.h.

References m_context.

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

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

Definition at line 393 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(), and GlobalPosition_Frontier_DevDB_cff::tag.

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

394 {
395  //At the moment this is a programming error
396  assert(iInfo == *(m_type->GetTypeInfo()));
397 
398  //lookup data if we don't already have it
399  if (m_accessor->data())
400  return m_accessor->data();
401 
402  m_errorMessage.clear();
403  if (!m_event)
404  return m_accessor->data();
405 
406  // Retrieve the data from the event.
408  edm::FWGenericHandle handle(Reflex::Type::ByTypeInfo(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:229
void setData(const Reflex::Object &) const
Definition: FWEventItem.cc:430
const std::string & name() const
Definition: FWEventItem.cc:500
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
std::string m_moduleLabel
Definition: FWEventItem.h:237
std::string m_processName
Definition: FWEventItem.h:239
tuple handle
Definition: patZpeak.py:22
bool m_printedErrorThisEvent
Definition: FWEventItem.h:245
const edm::EventBase * m_event
Definition: FWEventItem.h:240
std::string m_errorMessage
Definition: FWEventItem.h:246
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:86
std::string m_productInstanceLabel
Definition: FWEventItem.h:238
const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const
void FWEventItem::destroy ( ) const

Definition at line 608 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), goingToBeDestroyed_, id(), getHLTprescales::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:131
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:215
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
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:234
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:246
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:244
template<class T >
void FWEventItem::get ( const T *&  oData) const
inline
FWProxyBuilderConfiguration* FWEventItem::getConfig ( ) const
inline
const edm::EventBase* FWEventItem::getEvent ( ) const
inline

Definition at line 147 of file FWEventItem.h.

References m_event.

Referenced by FWSimTrackProxyBuilder::build(), FWTrackProxyBuilderFF::build(), and FWPFCandidateWithHitsProxyBuilder::initPFRecHitsCollections().

147  {
148  return m_event;
149  }
const edm::EventBase * m_event
Definition: FWEventItem.h:240
const FWGeometry * FWEventItem::getGeom ( ) const

Definition at line 681 of file FWEventItem.cc.

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

Referenced by FWConvTrackHitsDetailView::addModules(), FWTrackHitsDetailView::addModules(), fireworks::addSiStripClusters(), FWPRCaloTowerProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWPSimHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::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:84
const fireworks::Context * m_context
Definition: FWEventItem.h:226
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:229
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:393
void FWEventItem::handleChange ( )
private

Definition at line 379 of file FWEventItem.cc.

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

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

380 {
381  preItemChanged_(this);
382  FWChangeSentry sentry(*(this->changeManager()));
383  //want filter to rerun after all changes have been made
384  changeManager()->changed(this);
385  getPrimaryData();
386  runFilter();
387 }
FWItemChangeSignal preItemChanged_
Definition: FWEventItem.h:204
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:131
void getPrimaryData() const
Definition: FWEventItem.cc:443
void changed(const FWModelId &)
void runFilter()
Definition: FWEventItem.cc:208
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 142 of file FWEventItem.h.

References m_event.

142  {
143  return 0 != m_event;
144  }
const edm::EventBase * m_event
Definition: FWEventItem.h:240
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:231
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:62
const fireworks::Context * m_context
Definition: FWEventItem.h:226
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:62
const fireworks::Context * m_context
Definition: FWEventItem.h:226
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 44 of file FWEventItem.cc.

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

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

Definition at line 39 of file FWEventItem.cc.

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

40 {
41  return -100;
42 }
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 lumiQTWidget::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(), FWCaloTowerSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWModelIdFromEveSelector::doSelect(), FWCaloTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWModelIdFromEveSelector::doUnselect(), FWHFTowerProxyBuilderBase::fillCaloData(), FWCaloTowerProxyBuilderBase::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(), FWTrackProxyBuilderFF::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:232
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:242
void getPrimaryData() const
Definition: FWEventItem.cc:443
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
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:237
void FWEventItem::moveToBack ( )

Definition at line 334 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToBack().

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

change layering

Definition at line 311 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().

312 {
313  assert(0!=m_context->eventItemsManager());
314  int largest = layer();
316  itEnd = m_context->eventItemsManager()->end();
317  it != itEnd;
318  ++it) {
319  if ((*it) && (*it != this) && (*it)->layer() > largest) {
320  largest= (*it)->layer();
321  }
322  }
323 
324  if(largest >= layer()) {
325  m_layer = std::min(largest+1, maxLayerValue());
326  }
327 
328  m_itemInfos.clear();
329  m_accessor->reset();
330  handleChange();
331 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
#define min(a, b)
Definition: mlp_lapack.h:161
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
const fireworks::Context * m_context
Definition: FWEventItem.h:226
static int maxLayerValue()
Definition: FWEventItem.cc:44
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.
void handleChange()
Definition: FWEventItem.cc:379
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
void FWEventItem::moveToLayer ( int  layer)

Definition at line 357 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToLayer().

358 {
359  assert(0!=m_context->eventItemsManager());
360 
362 
363  m_itemInfos.clear();
364  m_accessor->reset();
365  handleChange();
366 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
#define min(a, b)
Definition: mlp_lapack.h:161
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
const fireworks::Context * m_context
Definition: FWEventItem.h:226
static int maxLayerValue()
Definition: FWEventItem.cc:44
int layer() const
Definition: FWEventItem.cc:457
const T & max(const T &a, const T &b)
static int minLayerValue()
Definition: FWEventItem.cc:39
void handleChange()
Definition: FWEventItem.cc:379
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:239
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:238
void FWEventItem::proxyConfigChanged ( )

Definition at line 369 of file FWEventItem.cc.

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

Referenced by FWProxyBuilderConfiguration::assertParam().

370 {
371  m_itemInfos.clear();
372  m_accessor->reset();
374  handleChange();
375 
376 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
const fireworks::Context * m_context
Definition: FWEventItem.h:226
void handleChange()
Definition: FWEventItem.cc:379
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:230
void FWEventItem::runFilter ( )
private

Definition at line 208 of file FWEventItem.cc.

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

Referenced by handleChange(), and setFilterExpression().

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

Definition at line 251 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(), FWCaloTowerSliceSelector::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().

252 {
253  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
254  if(not sel) {
255  sel = true;
256  FWModelId id(this,iIndex);
257  selectionManager()->select(id);
258  //want to make it obvious what type of object was selected
259  // therefore we also select the item
260  const_cast<FWEventItem*>(this)->selectItem();
261  changeManager()->changed(id);
262  }
263 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:131
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:494
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
void changed(const FWModelId &)
void selectItem()
Definition: FWEventItem.cc:632
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:208
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
bool m_isSelected
Definition: FWEventItem.h:248
void selectItem(FWEventItem *)
void FWEventItem::setData ( const Reflex::Object &  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:231
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:232
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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 156 of file FWEventItem.cc.

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

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

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

Definition at line 277 of file FWEventItem.cc.

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

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

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

Definition at line 121 of file FWEventItem.cc.

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

Referenced by FWEventItemsManager::newEvent().

122 {
123  m_printedErrorThisEvent = false;
124  m_event = iEvent;
125  m_accessor->reset();
126  m_itemInfos.clear();
127  handleChange();
128 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:231
int iEvent
Definition: GenABIO.cc:243
bool m_printedErrorThisEvent
Definition: FWEventItem.h:245
void handleChange()
Definition: FWEventItem.cc:379
const edm::EventBase * m_event
Definition: FWEventItem.h:240
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
void FWEventItem::setFilterExpression ( const std::string &  iExpression)

Throws an FWExpresionException if there is a problem with the expression

Definition at line 200 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::runFilter().

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

Definition at line 131 of file FWEventItem.cc.

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

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

Definition at line 144 of file FWEventItem.cc.

References m_name.

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

145 {
146  m_name = iName;
147 }
std::string m_name
Definition: FWEventItem.h:228
size_t FWEventItem::size ( void  ) const
void FWEventItem::toggleSelect ( int  iIndex) const

Definition at line 265 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().

266 {
267  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
268  sel = not sel;
269  FWModelId id(this,iIndex);
270  if (sel)
271  selectionManager()->select(id);
272  else selectionManager()->unselect(id);
273  changeManager()->changed(id);
274 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:131
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:208
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
bool m_isSelected
Definition: FWEventItem.h:248
void selectItem(FWEventItem *)
const TClass * FWEventItem::type ( ) const
void FWEventItem::unselect ( int  iIndex) const

Definition at line 240 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(), FWCaloTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWSecondarySelectableSelector::syncSelection(), and FWModelId::unselect().

241 {
242  //check if this is a change
243  if(bool& sel = m_itemInfos.at(iIndex).m_isSelected) {
244  sel=false;
245  FWModelId id(this,iIndex);
246  selectionManager()->unselect(id);
247  changeManager()->changed(id);
248  }
249 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:131
unsigned int id() const
Definition: FWEventItem.cc:494
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:234
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:208
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:134
bool m_isSelected
Definition: FWEventItem.h:248
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 196 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 208 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 211 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 215 of file FWEventItem.h.

Referenced by destroy(), CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWEveViewManager::newItem(), FWTableViewManager::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 246 of file FWEventItem.h.

Referenced by data(), and errorMessage().

const edm::EventBase* FWEventItem::m_event
private

Definition at line 240 of file FWEventItem.h.

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

FWModelFilter FWEventItem::m_filter
private

Definition at line 244 of file FWEventItem.h.

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

unsigned int FWEventItem::m_id
private

Definition at line 227 of file FWEventItem.h.

Referenced by id().

FWItemValueGetter FWEventItem::m_interestingValueGetter
private

Definition at line 242 of file FWEventItem.h.

Referenced by modelInterestingValueAsString(), and valueGetter().

bool FWEventItem::m_isSelected
private

Definition at line 248 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 233 of file FWEventItem.h.

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

std::string FWEventItem::m_moduleLabel
private

Definition at line 237 of file FWEventItem.h.

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

std::string FWEventItem::m_name
private

Definition at line 228 of file FWEventItem.h.

Referenced by name(), and setName().

bool FWEventItem::m_printedErrorThisEvent
mutableprivate

Definition at line 245 of file FWEventItem.h.

Referenced by data(), and setEvent().

std::string FWEventItem::m_processName
private

Definition at line 239 of file FWEventItem.h.

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

std::string FWEventItem::m_productInstanceLabel
private

Definition at line 238 of file FWEventItem.h.

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

FWProxyBuilderConfiguration* FWEventItem::m_proxyBuilderConfig
private

Definition at line 251 of file FWEventItem.h.

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

std::string FWEventItem::m_purpose
private

Definition at line 230 of file FWEventItem.h.

Referenced by purpose().

const TClass* FWEventItem::m_type
private

Definition at line 229 of file FWEventItem.h.

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

Reflex::Type FWEventItem::m_wrapperType
private

Definition at line 241 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 204 of file FWEventItem.h.

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