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, bool showFiltered=true, 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)
 
void setShowFilteredEntries (bool x)
 
bool showFilteredEntries () const
 
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 (bool filterUpdate=true)
 
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
 
bool m_showFilteredEntries
 
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,
bool  showFiltered = true,
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(),""),
70  m_showFilteredEntries(showFiltered),
72  m_isSelected(false),
74 {
75  //assert(m_type->GetTypeInfo());
76  //edm::TypeWithDict dataType(*(m_type->GetTypeInfo()));
77  //assert(dataType != edm::TypeWithDict() );
78  //
79  //std::string dataTypeName = dataType.name();
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 = edm::TypeWithDict::byName(wrapperName);
87  //
88  //assert(m_wrapperType != edm::TypeWithDict());
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:233
const FWDisplayProperties & displayProperties() const
unsigned int layer() const
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:246
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const fireworks::Context * m_context
Definition: FWEventItem.h:230
const TClass * type() const
std::string m_moduleLabel
Definition: FWEventItem.h:241
bool m_showFilteredEntries
Definition: FWEventItem.h:249
unsigned int m_id
Definition: FWEventItem.h:231
const std::string & moduleLabel() const
FWModelFilter m_filter
Definition: FWEventItem.h:248
std::string m_processName
Definition: FWEventItem.h:243
void setClassName(const std::string &)
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:256
const std::string & productInstanceLabel() const
bool m_printedErrorThisEvent
Definition: FWEventItem.h:250
const std::string & processName() const
const std::string & filterExpression() const
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:236
const edm::EventBase * m_event
Definition: FWEventItem.h:244
const std::string & name() const
const TClass * modelType() const
Definition: FWEventItem.cc:575
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
bool m_isSelected
Definition: FWEventItem.h:253
const std::string & purpose() const
std::string m_purpose
Definition: FWEventItem.h:234
std::string m_productInstanceLabel
Definition: FWEventItem.h:242
std::string m_name
Definition: FWEventItem.h:232
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:256

Member Function Documentation

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

Definition at line 140 of file FWEventItem.h.

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

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

140  {
141  return m_context->colorManager();
142  }
FWColorManager * colorManager() const
Definition: Context.h:65
const fireworks::Context * m_context
Definition: FWEventItem.h:230
const fireworks::Context& FWEventItem::context ( ) const
inline

Definition at line 129 of file FWEventItem.h.

References m_context.

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

129  {
130  return *m_context;
131  }
const fireworks::Context * m_context
Definition: FWEventItem.h:230
const void * FWEventItem::data ( const std::type_info &  iInfo) const

Definition at line 405 of file FWEventItem.cc.

References assert(), 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(), and getPrimaryData().

406 {
407  //At the moment this is a programming error
408  assert(iInfo == *(m_type->GetTypeInfo()));
409 
410  //lookup data if we don't already have it
411  if (m_accessor->data())
412  return m_accessor->data();
413 
414  m_errorMessage.clear();
415  if (!m_event)
416  return m_accessor->data();
417 
418  // Retrieve the data from the event.
420  edm::TypeWithDict type(iInfo);
422  try
423  {
425  setData(*handle);
426  }
427  catch (std::exception& iException)
428  {
430  {
431  std::ostringstream s;
432  s << "Failed to get " << name() << " because \n" <<iException.what();
433  m_errorMessage=s.str();
435  }
436  return 0;
437  }
438 
439  return m_accessor->data();
440 }
const TClass * m_type
Definition: FWEventItem.h:233
type
Definition: HCALResponse.h:21
const std::string & name() const
Definition: FWEventItem.cc:513
assert(m_qm.get())
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
std::string m_moduleLabel
Definition: FWEventItem.h:241
std::string m_processName
Definition: FWEventItem.h:243
const TClass * type() const
Definition: FWEventItem.cc:519
tuple handle
Definition: patZpeak.py:22
void setData(const edm::ObjectWithDict &) const
Definition: FWEventItem.cc:443
bool m_printedErrorThisEvent
Definition: FWEventItem.h:250
const edm::EventBase * m_event
Definition: FWEventItem.h:244
std::string m_errorMessage
Definition: FWEventItem.h:251
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:92
std::string m_productInstanceLabel
Definition: FWEventItem.h:242
const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const
void FWEventItem::destroy ( ) const

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

623 {
624  //NOTE: need to unselect first before announcing destruction
625  // because some items are listening to the display change and may
626  // not properly release their connection to that signal after they
627  // are destroyed via a connection to goingToBeDestroyed_
628  const_cast<FWEventItem*>(this)->unselectItem();
629  {
630  FWChangeSentry sentry(*(changeManager()));
631 
632  for(int index=0; index <static_cast<int>(size()); ++index) {
633  if(m_itemInfos.at(index).m_isSelected) {
634  FWModelId id(this,index);
635  selectionManager()->unselect(id);
636  changeManager()->changed(id);
637  }
638  }
639  }
640  goingToBeDestroyed_(this);
641  delete this;
642 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:219
unsigned int id() const
Definition: FWEventItem.cc:507
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:562
void unselectItem()
Definition: FWEventItem.cc:655
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
const std::string & FWEventItem::errorMessage ( ) const

returns error string if there was a problem this event

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

687 {
688  if(m_errorMessage.empty()) {
689  getPrimaryData();
690  }
691  return m_errorMessage;
692 }
void getPrimaryData() const
Definition: FWEventItem.cc:456
std::string m_errorMessage
Definition: FWEventItem.h:251
const std::string & FWEventItem::filterExpression ( ) const
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(), FWME0DigiProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWGEMDigiProxyBuilder::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:405
long double T
FWProxyBuilderConfiguration* FWEventItem::getConfig ( ) const
inline
const edm::EventBase* FWEventItem::getEvent ( ) const
inline
const FWGeometry * FWEventItem::getGeom ( ) const

Definition at line 695 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(), FWME0DigiProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWGEMDigiProxyBuilder::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().

695  {
696  return m_context->getGeom();
697 }
const FWGeometry * getGeom() const
Definition: Context.h:83
const fireworks::Context * m_context
Definition: FWEventItem.h:230
void FWEventItem::getPrimaryData ( ) const
private

Definition at line 456 of file FWEventItem.cc.

References data(), m_accessor, and m_type.

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

457 {
458  //if(0!=m_data) return;
459  if(0!=m_accessor->data()) return;
460  this->data(*(m_type->GetTypeInfo()));
461 }
const TClass * m_type
Definition: FWEventItem.h:233
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:405
void FWEventItem::handleChange ( bool  filterUpdate = true)
private

Definition at line 389 of file FWEventItem.cc.

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

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

390 {
391  preItemChanged_(this);
392  FWChangeSentry sentry(*(this->changeManager()));
393  //want filter to rerun after all changes have been made
394  changeManager()->changed(this);
395  if (filterUpdate) {
396  getPrimaryData();
397  runFilter();
398  }
399 }
FWItemChangeSignal preItemChanged_
Definition: FWEventItem.h:208
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
void getPrimaryData() const
Definition: FWEventItem.cc:456
void changed(const FWModelId &)
void runFilter()
Definition: FWEventItem.cc:215
bool FWEventItem::hasError ( void  ) const

returns true if failed to get data for this event

Definition at line 681 of file FWEventItem.cc.

References errorMessage().

Referenced by FWCollectionSummaryWidget::itemChanged().

681  {
682  return !errorMessage().empty();
683 }
const std::string & errorMessage() const
returns error string if there was a problem this event
Definition: FWEventItem.cc:686
bool FWEventItem::hasEvent ( ) const
inline

Definition at line 144 of file FWEventItem.h.

References m_event.

144  {
145  return 0 != m_event;
146  }
const edm::EventBase * m_event
Definition: FWEventItem.h:244
bool FWEventItem::haveInterestingValue ( ) const

Definition at line 601 of file FWEventItem.cc.

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

602 {
603  return true; //m_interestingValueGetter.isValid();
604 }
unsigned int FWEventItem::id ( void  ) const
bool FWEventItem::isCollection ( ) const

Definition at line 569 of file FWEventItem.cc.

References m_accessor.

570 {
571  return m_accessor->isCollection();
572 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
bool FWEventItem::isInBack ( ) const

returns true if item is behind all other items

Definition at line 491 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

492 {
495  itEnd = m_context->eventItemsManager()->end();
496  it != itEnd;
497  ++it) {
498  if((*it) && (*it != this) && (*it)->layer() <= layer()) {
499  return false;
500  }
501  }
502  return true;
503 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
assert(m_qm.get())
const fireworks::Context * m_context
Definition: FWEventItem.h:230
int layer() const
Definition: FWEventItem.cc:470
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 476 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

477 {
480  itEnd = m_context->eventItemsManager()->end();
481  it != itEnd;
482  ++it) {
483  if((*it) && (*it != this) && (*it)->layer() >= layer()) {
484  return false;
485  }
486  }
487  return true;
488 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
assert(m_qm.get())
const fireworks::Context * m_context
Definition: FWEventItem.h:230
int layer() const
Definition: FWEventItem.cc:470
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 470 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().

471 {
472  return m_layer;
473 }
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 548 of file FWEventItem.cc.

References getPrimaryData(), FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and tree::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(), FWCollectionSummaryTableManager::dataChanged(), 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(), FWCollectionSummaryTableManager::numberOfRows(), FWTableViewTableManager::rowHeader(), FWModelExpressionSelector::select(), FWCollectionSummaryModelCellRenderer::setData(), FWSecondarySelectableSelector::syncSelection(), FWTrackProxyBuilderFullFramework::visibilityModelChanges(), and FWSimpleProxyBuilder::visibilityModelChanges().

549 {
550  getPrimaryData();
552  return m_itemInfos.at(iIndex);
553  }
554 
555  FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties());
556  dp.setIsVisible(false);
557  ModelInfo t(dp,m_itemInfos.at(iIndex).isSelected());
558  return t;
559 }
tuple t
Definition: tree.py:139
void getPrimaryData() const
Definition: FWEventItem.cc:456
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:236
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
void setIsVisible(bool iSet)
const std::string & FWEventItem::modelInterestingValueAsString ( int  iIndex) const

Definition at line 608 of file FWEventItem.cc.

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

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

609 {
610  getPrimaryData();
611  return m_interestingValueGetter.getToolTip(m_accessor->modelData(iIndex));
612 }
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:246
void getPrimaryData() const
Definition: FWEventItem.cc:456
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const std::string & getToolTip(const void *iObject) const
std::string FWEventItem::modelName ( int  iIndex) const

Definition at line 588 of file FWEventItem.cc.

References name(), and alignCSCRings::s.

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

589 {
590  std::ostringstream s;
591  size_t lastChar = name().size();
592  //if name ends in 's' assume it is plural and remove the s for the individual object
593  if(name()[lastChar-1]=='s') {
594  --lastChar;
595  }
596  s<<name().substr(0,lastChar)<<" "<<iIndex;
597  return s.str();
598 }
const std::string & name() const
Definition: FWEventItem.cc:513
const TClass * FWEventItem::modelType ( ) const
const std::string & FWEventItem::moduleLabel ( ) const

Definition at line 531 of file FWEventItem.cc.

References m_moduleLabel.

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

532 {
533  return m_moduleLabel;
534 }
std::string m_moduleLabel
Definition: FWEventItem.h:241
void FWEventItem::moveToBack ( )

Definition at line 344 of file FWEventItem.cc.

References assert(), 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().

345 {
347  int smallest = layer();
349  itEnd = m_context->eventItemsManager()->end();
350  it != itEnd;
351  ++it) {
352  if((*it) && (*it != this) && (*it)->layer() < smallest) {
353  smallest= (*it)->layer();
354  }
355  }
356 
357  if(smallest <= layer()) {
358  m_layer = std::max(smallest-1, minLayerValue());
359  }
360 
361  m_itemInfos.clear();
362  m_accessor->reset();
363  handleChange(false);
364 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
assert(m_qm.get())
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const fireworks::Context * m_context
Definition: FWEventItem.h:230
int layer() const
Definition: FWEventItem.cc:470
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
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.
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
void FWEventItem::moveToFront ( )

change layering

Definition at line 321 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToFront().

322 {
324  int largest = layer();
326  itEnd = m_context->eventItemsManager()->end();
327  it != itEnd;
328  ++it) {
329  if ((*it) && (*it != this) && (*it)->layer() > largest) {
330  largest= (*it)->layer();
331  }
332  }
333 
334  if(largest >= layer()) {
335  m_layer = std::min(largest+1, maxLayerValue());
336  }
337 
338  m_itemInfos.clear();
339  m_accessor->reset();
340  handleChange(false);
341 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
assert(m_qm.get())
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const fireworks::Context * m_context
Definition: FWEventItem.h:230
static int maxLayerValue()
Definition: FWEventItem.cc:43
int layer() const
Definition: FWEventItem.cc:470
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
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.
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
std::vector< FWEventItem * >::const_iterator const_iterator
const_iterator end() const
void FWEventItem::moveToLayer ( int  layer)

Definition at line 367 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToLayer().

368 {
370 
372 
373  m_itemInfos.clear();
374  m_accessor->reset();
375  handleChange(false);
376 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
assert(m_qm.get())
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const fireworks::Context * m_context
Definition: FWEventItem.h:230
static int maxLayerValue()
Definition: FWEventItem.cc:43
int layer() const
Definition: FWEventItem.cc:470
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
T min(T a, T b)
Definition: MathUtil.h:58
static int minLayerValue()
Definition: FWEventItem.cc:38
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
const std::string & FWEventItem::name ( void  ) const
const std::string & FWEventItem::processName ( ) const

Definition at line 542 of file FWEventItem.cc.

References m_processName.

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

543 {
544  return m_processName;
545 }
std::string m_processName
Definition: FWEventItem.h:243
const std::string & FWEventItem::productInstanceLabel ( ) const

Definition at line 536 of file FWEventItem.cc.

References m_productInstanceLabel.

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

537 {
538  return m_productInstanceLabel;
539 }
std::string m_productInstanceLabel
Definition: FWEventItem.h:242
void FWEventItem::proxyConfigChanged ( )

Definition at line 379 of file FWEventItem.cc.

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

Referenced by FWProxyBuilderConfiguration::assertParam().

380 {
381  m_itemInfos.clear();
382  m_accessor->reset();
384  handleChange();
385 
386 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
const fireworks::Context * m_context
Definition: FWEventItem.h:230
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
const std::string & FWEventItem::purpose ( ) const

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

Definition at line 525 of file FWEventItem.cc.

References m_purpose.

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

526 {
527  return m_purpose;
528 }
std::string m_purpose
Definition: FWEventItem.h:234
void FWEventItem::runFilter ( )
private

Definition at line 215 of file FWEventItem.cc.

References ecal_dqm_sourceclient-live_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().

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

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

262 {
263  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
264  if(not sel) {
265  sel = true;
266  FWModelId id(this,iIndex);
267  selectionManager()->select(id);
268  //want to make it obvious what type of object was selected
269  // therefore we also select the item
270  const_cast<FWEventItem*>(this)->selectItem();
271  changeManager()->changed(id);
272  }
273 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:507
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
void changed(const FWModelId &)
void selectItem()
Definition: FWEventItem.cc:646
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
FWSelectionManager* FWEventItem::selectionManager ( ) const
inline
void FWEventItem::selectItem ( )

Select the item (i.e. container) itself

Definition at line 646 of file FWEventItem.cc.

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

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

647 {
648  if(!m_isSelected) {
649  m_isSelected=true;
650  selectionManager()->selectItem(this);
652  }
653 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:212
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
bool m_isSelected
Definition: FWEventItem.h:253
void selectItem(FWEventItem *)
void FWEventItem::setData ( const edm::ObjectWithDict iData) const
private

Definition at line 443 of file FWEventItem.cc.

References m_accessor, m_displayProperties, and m_itemInfos.

Referenced by data().

444 {
445  m_accessor->setData(iData);
446  //std::cout <<"size "<<m_accessor->size()<<std::endl;
447  if(m_accessor->isCollection()) {
448  m_itemInfos.reserve(m_accessor->size());
449  m_itemInfos.resize(m_accessor->size(),ModelInfo(m_displayProperties,false));
450  } else {
451  m_itemInfos.push_back(ModelInfo(m_displayProperties,false));
452  }
453 }
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:236
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
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(), 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().

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:133
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:212
Color_t color() const
Char_t transparency() const
unsigned int id() const
Definition: FWEventItem.cc:507
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:562
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:236
void setTransparency(Char_t transparency)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
void FWEventItem::setDisplayProperties ( int  iIndex,
const FWDisplayProperties iProps 
) const

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

288 {
289  FWDisplayProperties& prop = m_itemInfos.at(iIndex).m_displayProperties;
291  if( prop
292  != iProps ) {
293  prop = iProps;
294  FWModelId id(this,iIndex);
295  //selectionManager()->select(id);
296  changeManager()->changed(id);
297  }
298  } else {
299  if(iProps.isVisible()) {
300  FWChangeSentry sentry(*(this->changeManager()));
301  int size = m_accessor->size();
302  std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin();
303  for(int index = 0; index != size; ++index,++itInfo) {
304  if( itInfo->m_displayProperties.isVisible() ) {
305  itInfo->m_displayProperties.setIsVisible(false);
306  FWModelId id(this,index);
307  changeManager()->changed(id);
308  }
309  }
310  m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(true);
311  FWModelId id(this,iIndex);
312  changeManager()->changed(id);
313  const_cast<FWEventItem*>(this)->m_displayProperties.setIsVisible(true);
314  //NOTE: need to send out a signal here
316  }
317  }
318 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:212
boost::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:235
unsigned int id() const
Definition: FWEventItem.cc:507
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:562
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:236
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
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:235
int iEvent
Definition: GenABIO.cc:230
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
bool m_printedErrorThisEvent
Definition: FWEventItem.h:250
const edm::EventBase * m_event
Definition: FWEventItem.h:244
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
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:248
void setExpression(const std::string &)
void runFilter()
Definition: FWEventItem.cc:215
FWItemChangeSignal filterChanged_
Definition: FWEventItem.h:215
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:235
std::string m_moduleLabel
Definition: FWEventItem.h:241
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
std::string m_processName
Definition: FWEventItem.h:243
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
std::string m_productInstanceLabel
Definition: FWEventItem.h:242
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:232
void FWEventItem::setShowFilteredEntries ( bool  x)

Definition at line 208 of file FWEventItem.cc.

References handleChange(), and m_showFilteredEntries.

Referenced by CmsShowEDI::toggleShowFiltered().

209 {
211  handleChange(false);
212 }
bool m_showFilteredEntries
Definition: FWEventItem.h:249
void handleChange(bool filterUpdate=true)
Definition: FWEventItem.cc:389
bool FWEventItem::showFilteredEntries ( ) const
inline
size_t FWEventItem::size ( void  ) const

Definition at line 562 of file FWEventItem.cc.

References getPrimaryData(), and m_itemInfos.

Referenced by FWCaloRecHitDigitSetProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::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(), FWTableViewTableManager::rowHeader(), runFilter(), FWCaloRecHitDigitSetProxyBuilder::scaleProduct(), FWModelExpressionSelector::select(), CmsShowEDI::selectAll(), setDefaultDisplayProperties(), setDisplayProperties(), and FWSecondarySelectableSelector::syncSelection().

563 {
564  getPrimaryData();
565  return m_itemInfos.size();
566 }
void getPrimaryData() const
Definition: FWEventItem.cc:456
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
void FWEventItem::toggleSelect ( int  iIndex) const

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

276 {
277  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
278  sel = not sel;
279  FWModelId id(this,iIndex);
280  if (sel)
281  selectionManager()->select(id);
282  else selectionManager()->unselect(id);
283  changeManager()->changed(id);
284 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:507
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
void FWEventItem::toggleSelectItem ( )

Definition at line 664 of file FWEventItem.cc.

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

665 {
667  if(m_isSelected) {
668  selectionManager()->selectItem(this);
669  }else {
671  }
673 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:212
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
bool m_isSelected
Definition: FWEventItem.h:253
void selectItem(FWEventItem *)
const TClass * FWEventItem::type ( ) const
void FWEventItem::unselect ( int  iIndex) const

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

251 {
252  //check if this is a change
253  if(bool& sel = m_itemInfos.at(iIndex).m_isSelected) {
254  sel=false;
255  FWModelId id(this,iIndex);
256  selectionManager()->unselect(id);
257  changeManager()->changed(id);
258  }
259 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:133
unsigned int id() const
Definition: FWEventItem.cc:507
void unselect(const FWModelId &iId)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:238
void FWEventItem::unselectItem ( )

Definition at line 655 of file FWEventItem.cc.

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

Referenced by destroy().

656 {
657  if(m_isSelected) {
658  m_isSelected=false;
661  }
662 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:212
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:136
bool m_isSelected
Definition: FWEventItem.h:253
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 200 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 212 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 215 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 219 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 251 of file FWEventItem.h.

Referenced by data(), and errorMessage().

const edm::EventBase* FWEventItem::m_event
private

Definition at line 244 of file FWEventItem.h.

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

FWModelFilter FWEventItem::m_filter
private

Definition at line 248 of file FWEventItem.h.

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

unsigned int FWEventItem::m_id
private

Definition at line 231 of file FWEventItem.h.

Referenced by id().

FWItemValueGetter FWEventItem::m_interestingValueGetter
private

Definition at line 246 of file FWEventItem.h.

Referenced by modelInterestingValueAsString(), and valueGetter().

bool FWEventItem::m_isSelected
private

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

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

std::string FWEventItem::m_moduleLabel
private

Definition at line 241 of file FWEventItem.h.

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

std::string FWEventItem::m_name
private

Definition at line 232 of file FWEventItem.h.

Referenced by name(), and setName().

bool FWEventItem::m_printedErrorThisEvent
mutableprivate

Definition at line 250 of file FWEventItem.h.

Referenced by data(), and setEvent().

std::string FWEventItem::m_processName
private

Definition at line 243 of file FWEventItem.h.

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

std::string FWEventItem::m_productInstanceLabel
private

Definition at line 242 of file FWEventItem.h.

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

FWProxyBuilderConfiguration* FWEventItem::m_proxyBuilderConfig
private

Definition at line 256 of file FWEventItem.h.

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

std::string FWEventItem::m_purpose
private

Definition at line 234 of file FWEventItem.h.

Referenced by purpose().

bool FWEventItem::m_showFilteredEntries
private

Definition at line 249 of file FWEventItem.h.

Referenced by setShowFilteredEntries(), and showFilteredEntries().

const TClass* FWEventItem::m_type
private

Definition at line 233 of file FWEventItem.h.

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

edm::TypeWithDict FWEventItem::m_wrapperType
private

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

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