CMS 3D CMS Logo

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, std::shared_ptr< FWItemAccessorBase > iAccessor, const FWPhysicsObjectDesc &iDesc, const FWConfiguration *pbConf=nullptr)
 
template<class T >
void get (const T *&oData) const
 
FWProxyBuilderConfigurationgetConfig () const
 
const edm::EventBasegetEvent () const
 
const FWGeometrygetGeom () const
 
void getPrimaryData () 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 resetColor ()
 
void select (int iIndex) const
 
FWSelectionManagerselectionManager () const
 
void selectItem ()
 
void setData (const edm::ObjectWithDict &) const
 
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 handleChange ()
 
void runFilter ()
 

Private Attributes

std::shared_ptr< FWItemAccessorBasem_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
 
Color_t m_origColor
 
bool m_printedErrorThisEvent
 
std::string m_processName
 
std::string m_productInstanceLabel
 
FWProxyBuilderConfigurationm_proxyBuilderConfig
 
std::string m_purpose
 
const TClass * m_type
 
edm::TypeWithDict m_wrapperType
 

Detailed Description

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

Usage: <usage>

Definition at line 56 of file FWEventItem.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file FWEventItem.cc.

References FWDisplayProperties::color(), FWPhysicsObjectDesc::displayProperties(), m_accessor, m_filter, m_itemInfos, m_origColor, 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(nullptr),
68  m_interestingValueGetter(edm::TypeWithDict(*(m_accessor->modelType()->GetTypeInfo())), m_purpose),
69  m_filter(iDesc.filterExpression(),""),
71  m_isSelected(false),
72  m_origColor(0),
73  m_proxyBuilderConfig(nullptr)
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());
95 }
const TClass * m_type
Definition: FWEventItem.h:231
const FWDisplayProperties & displayProperties() const
Color_t m_origColor
Definition: FWEventItem.h:251
unsigned int layer() const
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:244
const fireworks::Context * m_context
Definition: FWEventItem.h:228
const TClass * type() const
std::string m_moduleLabel
Definition: FWEventItem.h:239
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
Color_t color() const
unsigned int m_id
Definition: FWEventItem.h:229
const std::string & moduleLabel() const
FWModelFilter m_filter
Definition: FWEventItem.h:246
std::string m_processName
Definition: FWEventItem.h:241
void setClassName(const std::string &)
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:253
const std::string & productInstanceLabel() const
bool m_printedErrorThisEvent
Definition: FWEventItem.h:247
const std::string & processName() const
const std::string & filterExpression() const
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:234
const edm::EventBase * m_event
Definition: FWEventItem.h:242
const std::string & name() const
const TClass * modelType() const
Definition: FWEventItem.cc:563
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
bool m_isSelected
Definition: FWEventItem.h:250
const std::string & purpose() const
std::string m_purpose
Definition: FWEventItem.h:232
std::string m_productInstanceLabel
Definition: FWEventItem.h:240
std::string m_name
Definition: FWEventItem.h:230
FWEventItem::~FWEventItem ( )
virtual

Definition at line 101 of file FWEventItem.cc.

References m_proxyBuilderConfig.

102 {
103  delete m_proxyBuilderConfig;
104 }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:253

Member Function Documentation

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

Definition at line 139 of file FWEventItem.h.

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

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

Definition at line 128 of file FWEventItem.h.

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

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

Definition at line 394 of file FWEventItem.cc.

References cppFunctionSkipper::exception, edm::EventBase::getByLabel(), cmsBatch::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 getPrimaryData().

395 {
396  //At the moment this is a programming error
397  assert(iInfo == *(m_type->GetTypeInfo()));
398 
399  //lookup data if we don't already have it
400  if (m_accessor->data())
401  return m_accessor->data();
402 
403  m_errorMessage.clear();
404  if (!m_event)
405  return m_accessor->data();
406 
407  // Retrieve the data from the event.
409  edm::TypeWithDict type(iInfo);
411  try
412  {
414  setData(*handle);
415  }
416  catch (std::exception& iException)
417  {
419  {
420  std::ostringstream s;
421  s << "Failed to get " << name() << " because \n" <<iException.what();
422  m_errorMessage=s.str();
424  }
425  return nullptr;
426  }
427 
428  return m_accessor->data();
429 }
const TClass * m_type
Definition: FWEventItem.h:231
type
Definition: HCALResponse.h:21
const std::string & name() const
Definition: FWEventItem.cc:502
std::string m_moduleLabel
Definition: FWEventItem.h:239
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
std::string m_processName
Definition: FWEventItem.h:241
const TClass * type() const
Definition: FWEventItem.cc:508
void setData(const edm::ObjectWithDict &) const
Definition: FWEventItem.cc:432
bool m_printedErrorThisEvent
Definition: FWEventItem.h:247
const edm::EventBase * m_event
Definition: FWEventItem.h:242
std::string m_errorMessage
Definition: FWEventItem.h:248
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
std::string m_productInstanceLabel
Definition: FWEventItem.h:240
const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const
void FWEventItem::destroy ( ) const

Definition at line 610 of file FWEventItem.cc.

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

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

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

returns error string if there was a problem this event

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

675 {
676  if(m_errorMessage.empty()) {
677  getPrimaryData();
678  }
679  return m_errorMessage;
680 }
void getPrimaryData() const
Definition: FWEventItem.cc:445
std::string m_errorMessage
Definition: FWEventItem.h:248
const std::string & FWEventItem::filterExpression ( ) const

Definition at line 604 of file FWEventItem.cc.

References FWModelFilter::expression(), and m_filter.

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

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

Definition at line 85 of file FWEventItem.h.

References data, triggerObjects_cff::id, ecalBarrelClusterFastTimer_cfi::modelName, dataset::name, modifiedElectrons_cfi::processName, trackingPlots::purpose, findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), FWPFCandidateWithHitsProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWPFCandidateTowerProxyBuilder::build(), FWCaloTowerProxyBuilderBase::build(), FWTrackProxyBuilderFullFramework::build(), FWHFTowerProxyBuilderBase::build(), FWHGTowerProxyBuilderBase::build(), FWGEMPadDigiProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), FWHFTowerSliceSelector::doSelect(), FWHGTowerSliceSelector::doSelect(), FWHFTowerSliceSelector::doUnselect(), FWHGTowerSliceSelector::doUnselect(), betterConfigParser.BetterConfigParser::getCompares(), 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().

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

Definition at line 683 of file FWEventItem.cc.

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

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

683  {
684  return m_context->getGeom();
685 }
const FWGeometry * getGeom() const
Definition: Context.h:83
const fireworks::Context * m_context
Definition: FWEventItem.h:228
void FWEventItem::getPrimaryData ( ) const

Definition at line 445 of file FWEventItem.cc.

References data(), m_accessor, and m_type.

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

446 {
447  //if(0!=m_data) return;
448  if(nullptr!=m_accessor->data()) return;
449  this->data(*(m_type->GetTypeInfo()));
450 }
const TClass * m_type
Definition: FWEventItem.h:231
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:394
void FWEventItem::handleChange ( )
private

Definition at line 380 of file FWEventItem.cc.

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

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

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

returns true if failed to get data for this event

Definition at line 669 of file FWEventItem.cc.

References errorMessage(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWCollectionSummaryWidget::itemChanged().

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

Definition at line 143 of file FWEventItem.h.

Referenced by FWFileEntry::runFilter().

143  {
144  return nullptr != m_event;
145  }
const edm::EventBase * m_event
Definition: FWEventItem.h:242
bool FWEventItem::haveInterestingValue ( ) const

Definition at line 589 of file FWEventItem.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

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

Definition at line 557 of file FWEventItem.cc.

References m_accessor.

558 {
559  return m_accessor->isCollection();
560 }
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
bool FWEventItem::isInBack ( ) const

returns true if item is behind all other items

Definition at line 480 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

481 {
482  assert(nullptr!=m_context->eventItemsManager());
484  itEnd = m_context->eventItemsManager()->end();
485  it != itEnd;
486  ++it) {
487  if((*it) && (*it != this) && (*it)->layer() <= layer()) {
488  return false;
489  }
490  }
491  return true;
492 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:228
int layer() const
Definition: FWEventItem.cc:459
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 465 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

466 {
467  assert(nullptr!=m_context->eventItemsManager());
469  itEnd = m_context->eventItemsManager()->end();
470  it != itEnd;
471  ++it) {
472  if((*it) && (*it != this) && (*it)->layer() >= layer()) {
473  return false;
474  }
475  }
476  return true;
477 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:228
int layer() const
Definition: FWEventItem.cc:459
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 459 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().

460 {
461  return m_layer;
462 }
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 537 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(), FWHistSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWHGTowerSliceSelector::doSelect(), FWModelIdFromEveSelector::doSelect(), FWHistSliceSelector::doUnselect(), FWHGTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWModelIdFromEveSelector::doUnselect(), FWCandidateTowerProxyBuilder::fillCaloData(), FWPFCandidateTowerProxyBuilder::fillCaloData(), FWCaloTowerProxyBuilderBase::fillCaloData(), FWHFTowerProxyBuilderBase::fillCaloData(), FWHGTowerProxyBuilderBase::fillCaloData(), CmsShowModelPopup::fillModelPopup(), FWProxyBuilderBase::increaseComponentTransparency(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), FWBeamSpotProxyBuilder::localModelChanges(), FWInteractionList::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWTableViewTableManager::rowHeader(), FWModelExpressionSelector::select(), FWCollectionSummaryModelCellRenderer::setData(), FWSecondarySelectableSelector::syncSelection(), FWTrackProxyBuilderFullFramework::visibilityModelChanges(), FWSimpleProxyBuilder::visibilityModelChanges(), and FWModelContextMenuHandler::~FWModelContextMenuHandler().

538 {
539  getPrimaryData();
541  return m_itemInfos.at(iIndex);
542  }
543  FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties());
544  dp.setIsVisible(false);
545  ModelInfo t(dp,m_itemInfos.at(iIndex).isSelected());
546  return t;
547 }
void getPrimaryData() const
Definition: FWEventItem.cc:445
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:234
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
void setIsVisible(bool iSet)
const std::string & FWEventItem::modelInterestingValueAsString ( int  iIndex) const

Definition at line 596 of file FWEventItem.cc.

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

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

597 {
598  getPrimaryData();
599  return m_interestingValueGetter.getToolTip(m_accessor->modelData(iIndex));
600 }
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:244
void getPrimaryData() const
Definition: FWEventItem.cc:445
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
const std::string & getToolTip(const void *iObject) const
std::string FWEventItem::modelName ( int  iIndex) const

Definition at line 576 of file FWEventItem.cc.

References name(), and alignCSCRings::s.

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

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

Definition at line 520 of file FWEventItem.cc.

References m_moduleLabel, and AlCaHLTBitMon_QueryRunRegistry::string.

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

521 {
522  return m_moduleLabel;
523 }
std::string m_moduleLabel
Definition: FWEventItem.h:239
void FWEventItem::moveToBack ( )

Definition at line 335 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToBack().

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

change layering

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

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

Definition at line 358 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToLayer().

359 {
360  assert(nullptr!=m_context->eventItemsManager());
361 
363 
364  m_itemInfos.clear();
365  m_accessor->reset();
366  handleChange();
367 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:228
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
static int maxLayerValue()
Definition: FWEventItem.cc:43
int layer() const
Definition: FWEventItem.cc:459
T min(T a, T b)
Definition: MathUtil.h:58
static int minLayerValue()
Definition: FWEventItem.cc:38
void handleChange()
Definition: FWEventItem.cc:380
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
const std::string & FWEventItem::name ( void  ) const
const std::string & FWEventItem::processName ( ) const

Definition at line 531 of file FWEventItem.cc.

References m_processName.

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

532 {
533  return m_processName;
534 }
std::string m_processName
Definition: FWEventItem.h:241
const std::string & FWEventItem::productInstanceLabel ( ) const
void FWEventItem::proxyConfigChanged ( )

Definition at line 370 of file FWEventItem.cc.

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

Referenced by FWProxyBuilderConfiguration::assertParam().

371 {
372  m_itemInfos.clear();
373  m_accessor->reset();
375  handleChange();
376 
377 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
const fireworks::Context * m_context
Definition: FWEventItem.h:228
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
void handleChange()
Definition: FWEventItem.cc:380
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
const std::string & FWEventItem::purpose ( ) const

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

Definition at line 514 of file FWEventItem.cc.

References m_purpose, and AlCaHLTBitMon_QueryRunRegistry::string.

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

515 {
516  return m_purpose;
517 }
std::string m_purpose
Definition: FWEventItem.h:232
void FWEventItem::resetColor ( )

Definition at line 687 of file FWEventItem.cc.

References FWModelChangeManager::changed(), changeManager(), defaultDisplayPropertiesChanged_, id(), m_displayProperties, m_itemInfos, m_origColor, FWDisplayProperties::setColor(), and size().

688 {
690 
691  FWChangeSentry sentry(*(this->changeManager()));
692  for(int index=0; index <static_cast<int>(size()); ++index) {
693  m_itemInfos.at(index).m_displayProperties.setColor(m_origColor);
694  FWModelId id(this,index);
695  changeManager()->changed(id);
696  }
697 
699 }
void setColor(Color_t iColor)
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:132
Color_t m_origColor
Definition: FWEventItem.h:251
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:211
unsigned int id() const
Definition: FWEventItem.cc:496
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:550
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:234
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
void FWEventItem::runFilter ( )
private

Definition at line 209 of file FWEventItem.cc.

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

Referenced by handleChange(), and setFilterExpression().

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

Definition at line 252 of file FWEventItem.cc.

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

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), FWHistSliceSelector::doSelect(), FWHGTowerSliceSelector::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().

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

Select the item (i.e. container) itself

Definition at line 634 of file FWEventItem.cc.

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

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

635 {
636  if(!m_isSelected) {
637  m_isSelected=true;
638  selectionManager()->selectItem(this);
640  }
641 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:211
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:135
bool m_isSelected
Definition: FWEventItem.h:250
void selectItem(FWEventItem *)
void FWEventItem::setData ( const edm::ObjectWithDict iData) const

Definition at line 432 of file FWEventItem.cc.

References m_accessor, m_displayProperties, and m_itemInfos.

Referenced by data().

433 {
434  m_accessor->setData(iData);
435  //std::cout <<"size "<<m_accessor->size()<<std::endl;
436  if(m_accessor->isCollection()) {
437  m_itemInfos.reserve(m_accessor->size());
438  m_itemInfos.resize(m_accessor->size(),ModelInfo(m_displayProperties,false));
439  } else {
440  m_itemInfos.push_back(ModelInfo(m_displayProperties,false));
441  }
442 }
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:234
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
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 157 of file FWEventItem.cc.

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

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

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

Definition at line 278 of file FWEventItem.cc.

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

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

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

Definition at line 122 of file FWEventItem.cc.

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

Referenced by FWEventItemsManager::newEvent(), and FWFileEntry::runFilter().

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

Throws an FWExpresionException if there is a problem with the expression

Definition at line 201 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::runFilter().

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

Definition at line 132 of file FWEventItem.cc.

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

135 {
136  m_moduleLabel = iModule;
137  m_productInstanceLabel = iProductInstance;
138  m_processName = iProcess;
139  m_accessor->reset();
140  m_itemInfos.clear();
141  handleChange();
142 }
std::string m_moduleLabel
Definition: FWEventItem.h:239
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
std::string m_processName
Definition: FWEventItem.h:241
void handleChange()
Definition: FWEventItem.cc:380
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
std::string m_productInstanceLabel
Definition: FWEventItem.h:240
void FWEventItem::setName ( const std::string &  iName)

Definition at line 145 of file FWEventItem.cc.

References m_name.

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

146 {
147  m_name = iName;
148 }
std::string m_name
Definition: FWEventItem.h:230
size_t FWEventItem::size ( void  ) const

Definition at line 550 of file FWEventItem.cc.

References getPrimaryData(), and m_itemInfos.

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

551 {
552  getPrimaryData();
553  return m_itemInfos.size();
554 }
void getPrimaryData() const
Definition: FWEventItem.cc:445
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:236
void FWEventItem::toggleSelect ( int  iIndex) const

Definition at line 266 of file FWEventItem.cc.

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

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

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

Definition at line 652 of file FWEventItem.cc.

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

653 {
655  if(m_isSelected) {
656  selectionManager()->selectItem(this);
657  }else {
659  }
661 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:211
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:135
bool m_isSelected
Definition: FWEventItem.h:250
void selectItem(FWEventItem *)
const TClass * FWEventItem::type ( ) const
void FWEventItem::unselect ( int  iIndex) const

Definition at line 241 of file FWEventItem.cc.

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

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

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

Definition at line 643 of file FWEventItem.cc.

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

Referenced by destroy().

644 {
645  if(m_isSelected) {
646  m_isSelected=false;
649  }
650 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:211
void unselectItem(FWEventItem *)
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:135
bool m_isSelected
Definition: FWEventItem.h:250
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 199 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 211 of file FWEventItem.h.

Referenced by CmsShowEDI::fillEDIFrame(), FWCollectionSummaryWidget::FWCollectionSummaryWidget(), resetColor(), 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 214 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 218 of file FWEventItem.h.

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

FWItemChangeSignal FWEventItem::itemChanged_
mutable
std::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 248 of file FWEventItem.h.

Referenced by data(), and errorMessage().

const edm::EventBase* FWEventItem::m_event
private

Definition at line 242 of file FWEventItem.h.

Referenced by data(), and setEvent().

FWModelFilter FWEventItem::m_filter
private

Definition at line 246 of file FWEventItem.h.

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

unsigned int FWEventItem::m_id
private

Definition at line 229 of file FWEventItem.h.

Referenced by id().

FWItemValueGetter FWEventItem::m_interestingValueGetter
private

Definition at line 244 of file FWEventItem.h.

Referenced by modelInterestingValueAsString().

bool FWEventItem::m_isSelected
private

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

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

std::string FWEventItem::m_moduleLabel
private

Definition at line 239 of file FWEventItem.h.

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

std::string FWEventItem::m_name
private

Definition at line 230 of file FWEventItem.h.

Referenced by name(), and setName().

Color_t FWEventItem::m_origColor
private

Definition at line 251 of file FWEventItem.h.

Referenced by FWEventItem(), and resetColor().

bool FWEventItem::m_printedErrorThisEvent
mutableprivate

Definition at line 247 of file FWEventItem.h.

Referenced by data(), and setEvent().

std::string FWEventItem::m_processName
private

Definition at line 241 of file FWEventItem.h.

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

std::string FWEventItem::m_productInstanceLabel
private

Definition at line 240 of file FWEventItem.h.

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

FWProxyBuilderConfiguration* FWEventItem::m_proxyBuilderConfig
private

Definition at line 253 of file FWEventItem.h.

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

std::string FWEventItem::m_purpose
private

Definition at line 232 of file FWEventItem.h.

Referenced by purpose().

const TClass* FWEventItem::m_type
private

Definition at line 231 of file FWEventItem.h.

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

edm::TypeWithDict FWEventItem::m_wrapperType
private

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

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