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 (bool k=false)
 
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:566
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 397 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().

398 {
399  //At the moment this is a programming error
400  assert(iInfo == *(m_type->GetTypeInfo()));
401 
402  //lookup data if we don't already have it
403  if (m_accessor->data())
404  return m_accessor->data();
405 
406  m_errorMessage.clear();
407  if (!m_event)
408  return m_accessor->data();
409 
410  // Retrieve the data from the event.
412  edm::TypeWithDict type(iInfo);
414  try
415  {
417  setData(*handle);
418  }
419  catch (std::exception& iException)
420  {
422  {
423  std::ostringstream s;
424  s << "Failed to get " << name() << " because \n" <<iException.what();
425  m_errorMessage=s.str();
427  }
428  return nullptr;
429  }
430 
431  return m_accessor->data();
432 }
const TClass * m_type
Definition: FWEventItem.h:231
type
Definition: HCALResponse.h:21
const std::string & name() const
Definition: FWEventItem.cc:505
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:511
void setData(const edm::ObjectWithDict &) const
Definition: FWEventItem.cc:435
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:92
std::string m_productInstanceLabel
Definition: FWEventItem.h:240
const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const
void FWEventItem::destroy ( ) const

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

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

678 {
679  if(m_errorMessage.empty()) {
680  getPrimaryData();
681  }
682  return m_errorMessage;
683 }
void getPrimaryData() const
Definition: FWEventItem.cc:448
std::string m_errorMessage
Definition: FWEventItem.h:248
const std::string & FWEventItem::filterExpression ( ) const

Definition at line 607 of file FWEventItem.cc.

References FWModelFilter::expression(), and m_filter.

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

608 {
609  return m_filter.expression();
610 }
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, hgcalPlots::purpose, findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), FWPFCandidateWithHitsProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWHGCalMultiClusterLegoProxyBuilder::build(), FWPhase2TrackerCluster1DDetProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::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(), betterConfigParser.BetterConfigParser::getGeneral(), FWHGCalMultiClusterSliceSelector::getItemEntryEtaPhi(), 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:397
long double T
FWProxyBuilderConfiguration* FWEventItem::getConfig ( ) const
inline

Definition at line 169 of file FWEventItem.h.

References pyrootRender::destroy(), gen::k, TauGenJetsDecayModeSelectorAllHadrons_cfi::select, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWCaloRecHitDigitSetProxyBuilder::build(), FWHGCalMultiClusterProxyBuilder::build(), FWHGCRecHitProxyBuilder::build(), FWMuonRhoPhiProxyBuilder::build(), FWCaloParticleProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWGenParticleLegoProxyBuilder::build(), FWMuonProxyBuilder::build(), FWTrackProxyBuilder::build(), FWTrackProxyBuilderFullFramework::build(), FWVertexCandidateProxyBuilder::build(), FWVertexProxyBuilder::build(), FWJetProxyBuilder::buildViewType(), CmsShowEDI::fillEDIFrame(), FWElectronProxyBuilder::requestCommon(), FWCaloRecHitDigitSetProxyBuilder::setItem(), FWGenParticleLegoProxyBuilder::setItem(), FWMuonRhoPhiProxyBuilder::setItem(), FWMuonProxyBuilder::setItem(), FWTrackingParticleProxyBuilder::setItem(), FWHGCRecHitProxyBuilder::setItem(), FWCandidateProxyBuilder::setItem(), FWCaloClusterProxyBuilder::setItem(), FWTrackProxyBuilder::setItem(), FWTrackProxyBuilderFullFramework::setItem(), FWVertexCandidateProxyBuilder::setItem(), FWVertexProxyBuilder::setItem(), FWElectronProxyBuilder::setItem(), FWTauProxyBuilderBase::setItem(), FWJetProxyBuilder::setItem(), FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::setItem(), and FWJetProxyBuilder::setTextPos().

169 { return m_proxyBuilderConfig; }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:253
const edm::EventBase* FWEventItem::getEvent ( ) const
inline
const FWGeometry * FWEventItem::getGeom ( ) const

Definition at line 686 of file FWEventItem.cc.

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

Referenced by FWTrackHitsDetailView::addModules(), FWConvTrackHitsDetailView::addModules(), fireworks::addSiStripClusters(), FWPRCaloTowerProxyBuilder::build(), FWHGCalMultiClusterProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWME0DigiProxyBuilder::build(), FWME0SegmentProxyBuilder::build(), FWPhase2TrackerCluster1DDetProxyBuilder::build(), FWHGCRecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWCaloParticleProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWPhase2TrackerCluster1DProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWGEMDigiProxyBuilder::build(), FWTrackingParticleProxyBuilderFullFramework::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().

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

Definition at line 448 of file FWEventItem.cc.

References data(), m_accessor, and m_type.

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

449 {
450  //if(0!=m_data) return;
451  if(nullptr!=m_accessor->data()) return;
452  this->data(*(m_type->GetTypeInfo()));
453 }
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:397
void FWEventItem::handleChange ( )
private

Definition at line 383 of file FWEventItem.cc.

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

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

384 {
385  preItemChanged_(this);
386  FWChangeSentry sentry(*(this->changeManager()));
387  //want filter to rerun after all changes have been made
388  changeManager()->changed(this);
389  getPrimaryData();
390  runFilter();
391 }
FWItemChangeSignal preItemChanged_
Definition: FWEventItem.h:207
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:132
void getPrimaryData() const
Definition: FWEventItem.cc:448
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 672 of file FWEventItem.cc.

References errorMessage(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWCollectionSummaryWidget::itemChanged().

672  {
673  return !errorMessage().empty();
674 }
const std::string & errorMessage() const
returns error string if there was a problem this event
Definition: FWEventItem.cc:677
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 592 of file FWEventItem.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

593 {
594  return true; //m_interestingValueGetter.isValid();
595 }
unsigned int FWEventItem::id ( void  ) const
bool FWEventItem::isCollection ( ) const

Definition at line 560 of file FWEventItem.cc.

References m_accessor.

561 {
562  return m_accessor->isCollection();
563 }
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 483 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

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

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

Referenced by CmsShowEDI::updateLayerControls().

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

463 {
464  return m_layer;
465 }
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 540 of file FWEventItem.cc.

References getPrimaryData(), FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and protons_cff::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(), FWHGTowerSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWModelIdFromEveSelector::doSelect(), FWHistSliceSelector::doUnselect(), FWHGTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWModelIdFromEveSelector::doUnselect(), FWHGCalMultiClusterLegoProxyBuilder::fillCaloData(), 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().

541 {
542  getPrimaryData();
544  return m_itemInfos.at(iIndex);
545  }
546  FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties());
547  dp.setIsVisible(false);
548  ModelInfo t(dp,m_itemInfos.at(iIndex).isSelected());
549  return t;
550 }
void getPrimaryData() const
Definition: FWEventItem.cc:448
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 599 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().

600 {
601  getPrimaryData();
602  return m_interestingValueGetter.getToolTip(m_accessor->modelData(iIndex));
603 }
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:244
void getPrimaryData() const
Definition: FWEventItem.cc:448
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 579 of file FWEventItem.cc.

References name(), and alignCSCRings::s.

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

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

Definition at line 523 of file FWEventItem.cc.

References m_moduleLabel, and AlCaHLTBitMon_QueryRunRegistry::string.

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

524 {
525  return m_moduleLabel;
526 }
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:462
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:383
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:462
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:383
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:462
T min(T a, T b)
Definition: MathUtil.h:58
static int minLayerValue()
Definition: FWEventItem.cc:38
void handleChange()
Definition: FWEventItem.cc:383
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 534 of file FWEventItem.cc.

References m_processName.

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

535 {
536  return m_processName;
537 }
std::string m_processName
Definition: FWEventItem.h:241
const std::string & FWEventItem::productInstanceLabel ( ) const
void FWEventItem::proxyConfigChanged ( bool  k = false)

Definition at line 370 of file FWEventItem.cc.

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

Referenced by FWProxyBuilderConfiguration::assertParam().

371 {
372  if(!k){
373  m_itemInfos.clear();
374  m_accessor->reset();
376  handleChange();
377  } else {
378  changeManager()->changed(this);
379  }
380 }
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:132
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 k[5][pyjets_maxn]
void changed(const FWModelId &)
void handleChange()
Definition: FWEventItem.cc:383
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 517 of file FWEventItem.cc.

References m_purpose, and AlCaHLTBitMon_QueryRunRegistry::string.

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

518 {
519  return m_purpose;
520 }
std::string m_purpose
Definition: FWEventItem.h:232
void FWEventItem::resetColor ( )

Definition at line 690 of file FWEventItem.cc.

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

691 {
693 
694  FWChangeSentry sentry(*(this->changeManager()));
695  for(int index=0; index <static_cast<int>(size()); ++index) {
696  m_itemInfos.at(index).m_displayProperties.setColor(m_origColor);
697  FWModelId id(this,index);
698  changeManager()->changed(id);
699  }
700 
702 }
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:499
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:553
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:505
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:233
FWModelFilter m_filter
Definition: FWEventItem.h:246
unsigned int id() const
Definition: FWEventItem.cc:499
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:553
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:499
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:135
void changed(const FWModelId &)
void selectItem()
Definition: FWEventItem.cc:637
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 637 of file FWEventItem.cc.

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

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

638 {
639  if(!m_isSelected) {
640  m_isSelected=true;
641  selectionManager()->selectItem(this);
643  }
644 }
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 435 of file FWEventItem.cc.

References m_accessor, m_displayProperties, and m_itemInfos.

Referenced by data().

436 {
437  m_accessor->setData(iData);
438  //std::cout <<"size "<<m_accessor->size()<<std::endl;
439  if(m_accessor->isCollection()) {
440  m_itemInfos.reserve(m_accessor->size());
441  m_itemInfos.resize(m_accessor->size(),ModelInfo(m_displayProperties,false));
442  } else {
443  m_itemInfos.push_back(ModelInfo(m_displayProperties,false));
444  }
445 }
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:499
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:553
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:499
void changed(const FWModelId &)
size_t size() const
Definition: FWEventItem.cc:553
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:224
bool m_printedErrorThisEvent
Definition: FWEventItem.h:247
void handleChange()
Definition: FWEventItem.cc:383
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:383
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 553 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().

554 {
555  getPrimaryData();
556  return m_itemInfos.size();
557 }
void getPrimaryData() const
Definition: FWEventItem.cc:448
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:499
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 655 of file FWEventItem.cc.

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

656 {
658  if(m_isSelected) {
659  selectionManager()->selectItem(this);
660  }else {
662  }
664 }
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:499
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 646 of file FWEventItem.cc.

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

Referenced by destroy().

647 {
648  if(m_isSelected) {
649  m_isSelected=false;
652  }
653 }
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().