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::FWEventItem ( fireworks::Context iContext,
unsigned int  iItemId,
std::shared_ptr< FWItemAccessorBase iAccessor,
const FWPhysicsObjectDesc iDesc,
const FWConfiguration pbConf = nullptr 
)

Definition at line 45 of file FWEventItem.cc.

References FWDisplayProperties::color(), FWPhysicsObjectDesc::displayProperties(), m_accessor, m_filter, m_itemInfos, m_origColor, m_proxyBuilderConfig, modelType(), and FWModelFilter::setClassName().

50  : m_context(iContext),
51  m_id(iId),
52  m_name(iDesc.name()),
53  m_type(iDesc.type()),
54  m_purpose(iDesc.purpose()),
55  m_accessor(iAccessor),
57  m_layer(iDesc.layer()),
58  m_moduleLabel(iDesc.moduleLabel()),
60  m_processName(iDesc.processName()),
61  m_event(nullptr),
62  m_interestingValueGetter(edm::TypeWithDict(*(m_accessor->modelType()->GetTypeInfo())), m_purpose),
63  m_filter(iDesc.filterExpression(), ""),
65  m_isSelected(false),
66  m_origColor(0),
67  m_proxyBuilderConfig(nullptr) {
68  //assert(m_type->GetTypeInfo());
69  //edm::TypeWithDict dataType(*(m_type->GetTypeInfo()));
70  //assert(dataType != edm::TypeWithDict() );
71  //
72  //std::string dataTypeName = dataType.name();
73  //if (dataTypeName[dataTypeName.size() -1] == '>')
74  // dataTypeName += " ";
75  //std::string wrapperName = "edm::Wrapper<" + dataTypeName + ">";
76  //
77  //fwLog(fwlog::kDebug) << "Looking for the wrapper name"
78  // << wrapperName << std::endl;
79  //m_wrapperType = edm::TypeWithDict::byName(wrapperName);
80  //
81  //assert(m_wrapperType != edm::TypeWithDict());
82  if (!m_accessor->isCollection()) {
83  m_itemInfos.reserve(1);
84  }
85  m_filter.setClassName(modelType()->GetName());
88 }
const TClass * m_type
Definition: FWEventItem.h:210
const std::string & moduleLabel() const
const std::string & name() const
Color_t m_origColor
Definition: FWEventItem.h:230
const std::string & productInstanceLabel() const
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:223
const std::string & filterExpression() const
const fireworks::Context * m_context
Definition: FWEventItem.h:207
std::string m_moduleLabel
Definition: FWEventItem.h:218
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
unsigned int m_id
Definition: FWEventItem.h:208
const TClass * modelType() const
Definition: FWEventItem.cc:464
FWModelFilter m_filter
Definition: FWEventItem.h:225
const TClass * type() const
const FWDisplayProperties & displayProperties() const
std::string m_processName
Definition: FWEventItem.h:220
unsigned int layer() const
void setClassName(const std::string &)
const std::string & purpose() const
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:232
bool m_printedErrorThisEvent
Definition: FWEventItem.h:226
const std::string & processName() const
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
const edm::EventBase * m_event
Definition: FWEventItem.h:221
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215
bool m_isSelected
Definition: FWEventItem.h:229
std::string m_purpose
Definition: FWEventItem.h:211
std::string m_productInstanceLabel
Definition: FWEventItem.h:219
std::string m_name
Definition: FWEventItem.h:209

◆ ~FWEventItem()

FWEventItem::~FWEventItem ( )
virtual

Definition at line 94 of file FWEventItem.cc.

References m_proxyBuilderConfig.

94 { delete m_proxyBuilderConfig; }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:232

Member Function Documentation

◆ changeManager()

FWModelChangeManager* FWEventItem::changeManager ( ) const
inline

◆ colorManager()

FWColorManager* FWEventItem::colorManager ( ) const
inline

◆ context()

const fireworks::Context& FWEventItem::context ( ) const
inline

Definition at line 121 of file FWEventItem.h.

References m_context.

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

121 { return *m_context; }
const fireworks::Context * m_context
Definition: FWEventItem.h:207

◆ data()

const void * FWEventItem::data ( const std::type_info &  iInfo) const

Definition at line 353 of file FWEventItem.cc.

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

Referenced by get(), and getPrimaryData().

353  {
354  //At the moment this is a programming error
355  assert(iInfo == *(m_type->GetTypeInfo()));
356 
357  //lookup data if we don't already have it
358  if (m_accessor->data())
359  return m_accessor->data();
360 
361  m_errorMessage.clear();
362  if (!m_event)
363  return m_accessor->data();
364 
365  // Retrieve the data from the event.
367  edm::TypeWithDict type(iInfo);
369  try {
371  setData(*handle);
372  } catch (std::exception& iException) {
374  std::ostringstream s;
375  s << "Failed to get " << name() << " because \n" << iException.what();
376  m_errorMessage = s.str();
378  }
379  return nullptr;
380  }
381 
382  return m_accessor->data();
383 }
const TClass * m_type
Definition: FWEventItem.h:210
void setData(const edm::ObjectWithDict &) const
Definition: FWEventItem.cc:385
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:97
assert(be >=bs)
std::string m_moduleLabel
Definition: FWEventItem.h:218
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
std::string m_processName
Definition: FWEventItem.h:220
bool m_printedErrorThisEvent
Definition: FWEventItem.h:226
const TClass * type() const
Definition: FWEventItem.cc:437
const std::string & name() const
Definition: FWEventItem.cc:435
const edm::EventBase * m_event
Definition: FWEventItem.h:221
std::string m_errorMessage
Definition: FWEventItem.h:227
std::string m_productInstanceLabel
Definition: FWEventItem.h:219

◆ defaultDisplayProperties()

const FWDisplayProperties & FWEventItem::defaultDisplayProperties ( ) const

◆ destroy()

void FWEventItem::destroy ( ) const

Definition at line 493 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::removeItem().

493  {
494  //NOTE: need to unselect first before announcing destruction
495  // because some items are listening to the display change and may
496  // not properly release their connection to that signal after they
497  // are destroyed via a connection to goingToBeDestroyed_
498  const_cast<FWEventItem*>(this)->unselectItem();
499  {
500  FWChangeSentry sentry(*(changeManager()));
501 
502  for (int index = 0; index < static_cast<int>(size()); ++index) {
503  if (m_itemInfos.at(index).m_isSelected) {
504  FWModelId id(this, index);
505  selectionManager()->unselect(id);
506  changeManager()->changed(id);
507  }
508  }
509  }
510  goingToBeDestroyed_(this);
511  delete this;
512 }
size_t size() const
Definition: FWEventItem.cc:457
unsigned int id() const
Definition: FWEventItem.cc:433
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:197
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void unselect(const FWModelId &iId)
void changed(const FWModelId &)
void unselectItem()
Definition: FWEventItem.cc:521
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ errorMessage()

const std::string & FWEventItem::errorMessage ( ) const

returns error string if there was a problem this event

Definition at line 541 of file FWEventItem.cc.

References getPrimaryData(), and m_errorMessage.

Referenced by hasError(), FWCollectionSummaryWidget::itemChanged(), and ConfigToolBase.ConfigToolBase::typeError().

541  {
542  if (m_errorMessage.empty()) {
543  getPrimaryData();
544  }
545  return m_errorMessage;
546 }
void getPrimaryData() const
Definition: FWEventItem.cc:396
std::string m_errorMessage
Definition: FWEventItem.h:227

◆ filterExpression()

const std::string & FWEventItem::filterExpression ( ) const

Definition at line 491 of file FWEventItem.cc.

References FWModelFilter::expression(), and m_filter.

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

491 { return m_filter.expression(); }
const std::string & expression() const
FWModelFilter m_filter
Definition: FWEventItem.h:225

◆ get()

template<class T >
void FWEventItem::get ( const T *&  oData) const
inline

Definition at line 78 of file FWEventItem.h.

References data().

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

78  {
79  oData = reinterpret_cast<const T*>(data(typeid(T)));
80  }
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:353
long double T

◆ getConfig()

FWProxyBuilderConfiguration* FWEventItem::getConfig ( ) const
inline

Definition at line 150 of file FWEventItem.h.

References m_proxyBuilderConfig.

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

150 { return m_proxyBuilderConfig; }
FWProxyBuilderConfiguration * m_proxyBuilderConfig
Definition: FWEventItem.h:232

◆ getEvent()

const edm::EventBase* FWEventItem::getEvent ( ) const
inline

◆ getGeom()

const FWGeometry * FWEventItem::getGeom ( ) const

Definition at line 548 of file FWEventItem.cc.

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

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

548 { return m_context->getGeom(); }
const fireworks::Context * m_context
Definition: FWEventItem.h:207
FWGeometry * getGeom() const
Definition: Context.h:72

◆ getPrimaryData()

void FWEventItem::getPrimaryData ( ) const

Definition at line 396 of file FWEventItem.cc.

References data(), m_accessor, and m_type.

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

396  {
397  //if(0!=m_data) return;
398  if (nullptr != m_accessor->data())
399  return;
400  this->data(*(m_type->GetTypeInfo()));
401 }
const TClass * m_type
Definition: FWEventItem.h:210
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
const void * data(const std::type_info &) const
Definition: FWEventItem.cc:353

◆ handleChange()

void FWEventItem::handleChange ( )
private

Definition at line 341 of file FWEventItem.cc.

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

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

341  {
342  preItemChanged_(this);
343  FWChangeSentry sentry(*(this->changeManager()));
344  //want filter to rerun after all changes have been made
345  changeManager()->changed(this);
346  getPrimaryData();
347  runFilter();
348 }
FWItemChangeSignal preItemChanged_
Definition: FWEventItem.h:186
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
void getPrimaryData() const
Definition: FWEventItem.cc:396
void changed(const FWModelId &)
void runFilter()
Definition: FWEventItem.cc:186

◆ hasError()

bool FWEventItem::hasError ( void  ) const

returns true if failed to get data for this event

Definition at line 539 of file FWEventItem.cc.

References errorMessage().

Referenced by FWCollectionSummaryWidget::itemChanged().

539 { return !errorMessage().empty(); }
const std::string & errorMessage() const
returns error string if there was a problem this event
Definition: FWEventItem.cc:541

◆ hasEvent()

bool FWEventItem::hasEvent ( ) const
inline

Definition at line 128 of file FWEventItem.h.

References m_event.

128 { return nullptr != m_event; }
const edm::EventBase * m_event
Definition: FWEventItem.h:221

◆ haveInterestingValue()

bool FWEventItem::haveInterestingValue ( ) const

Definition at line 482 of file FWEventItem.cc.

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

482  {
483  return true; //m_interestingValueGetter.isValid();
484 }

◆ id()

unsigned int FWEventItem::id ( void  ) const

◆ isCollection()

bool FWEventItem::isCollection ( ) const

Definition at line 462 of file FWEventItem.cc.

References m_accessor.

462 { return m_accessor->isCollection(); }
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212

◆ isInBack()

bool FWEventItem::isInBack ( ) const

returns true if item is behind all other items

Definition at line 420 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

420  {
421  assert(nullptr != m_context->eventItemsManager());
423  itEnd = m_context->eventItemsManager()->end();
424  it != itEnd;
425  ++it) {
426  if ((*it) && (*it != this) && (*it)->layer() <= layer()) {
427  return false;
428  }
429  }
430  return true;
431 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const fireworks::Context * m_context
Definition: FWEventItem.h:207
assert(be >=bs)
int layer() const
Definition: FWEventItem.cc:405
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
const_iterator end() const
std::vector< FWEventItem * >::const_iterator const_iterator

◆ isInFront()

bool FWEventItem::isInFront ( ) const

returns true if item is in front of all other items

Definition at line 407 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::updateLayerControls().

407  {
408  assert(nullptr != m_context->eventItemsManager());
410  itEnd = m_context->eventItemsManager()->end();
411  it != itEnd;
412  ++it) {
413  if ((*it) && (*it != this) && (*it)->layer() >= layer()) {
414  return false;
415  }
416  }
417  return true;
418 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const fireworks::Context * m_context
Definition: FWEventItem.h:207
assert(be >=bs)
int layer() const
Definition: FWEventItem.cc:405
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
const_iterator end() const
std::vector< FWEventItem * >::const_iterator const_iterator

◆ itemIsSelected()

bool FWEventItem::itemIsSelected ( ) const

◆ layer()

int FWEventItem::layer ( ) const

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

Definition at line 405 of file FWEventItem.cc.

References m_layer.

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

405 { return m_layer; }

◆ maxLayerValue()

int FWEventItem::maxLayerValue ( )
static

Definition at line 40 of file FWEventItem.cc.

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

40 { return 100; }

◆ minLayerValue()

int FWEventItem::minLayerValue ( )
static

Definition at line 38 of file FWEventItem.cc.

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

38 { return -100; }

◆ modelData()

const void * FWEventItem::modelData ( int  iIndex) const

◆ modelInfo()

FWEventItem::ModelInfo FWEventItem::modelInfo ( int  iIndex) const

Definition at line 446 of file FWEventItem.cc.

References Calorimetry_cff::dp, getPrimaryData(), FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, and submitPVValidationJobs::t.

Referenced by FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWTracksterHitsProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWPFEcalClusterRPZProxyBuilder::build(), FWPFHcalClusterRPZProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::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(), FWProxyBuilderBase::increaseComponentTransparency(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), FWBeamSpotProxyBuilder::localModelChanges(), FWPhase2TrackerCluster1DProxyBuilder::localModelChanges(), FWInteractionList::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWTableViewTableManager::rowHeader(), FWModelExpressionSelector::select(), FWCollectionSummaryModelCellRenderer::setData(), FWSecondarySelectableSelector::syncSelection(), FWTrackProxyBuilderFullFramework::visibilityModelChanges(), and FWSimpleProxyBuilder::visibilityModelChanges().

446  {
447  getPrimaryData();
449  return m_itemInfos.at(iIndex);
450  }
451  FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties());
452  dp.setIsVisible(false);
453  ModelInfo t(dp, m_itemInfos.at(iIndex).isSelected());
454  return t;
455 }
void getPrimaryData() const
Definition: FWEventItem.cc:396
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ modelInterestingValueAsString()

const std::string & FWEventItem::modelInterestingValueAsString ( int  iIndex) const

Definition at line 486 of file FWEventItem.cc.

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

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

486  {
487  getPrimaryData();
488  return m_interestingValueGetter.getToolTip(m_accessor->modelData(iIndex));
489 }
FWItemValueGetter m_interestingValueGetter
Definition: FWEventItem.h:223
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
void getPrimaryData() const
Definition: FWEventItem.cc:396
const std::string & getToolTip(const void *iObject) const

◆ modelName()

std::string FWEventItem::modelName ( int  iIndex) const

Definition at line 471 of file FWEventItem.cc.

References name(), and alignCSCRings::s.

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

471  {
472  std::ostringstream s;
473  size_t lastChar = name().size();
474  //if name ends in 's' assume it is plural and remove the s for the individual object
475  if (name()[lastChar - 1] == 's') {
476  --lastChar;
477  }
478  s << name().substr(0, lastChar) << " " << iIndex;
479  return s.str();
480 }
const std::string & name() const
Definition: FWEventItem.cc:435

◆ modelType()

const TClass * FWEventItem::modelType ( ) const

◆ moduleLabel()

const std::string & FWEventItem::moduleLabel ( ) const

Definition at line 441 of file FWEventItem.cc.

References m_moduleLabel.

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

441 { return m_moduleLabel; }
std::string m_moduleLabel
Definition: FWEventItem.h:218

◆ moveToBack()

void FWEventItem::moveToBack ( )

Definition at line 299 of file FWEventItem.cc.

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

299  {
300  assert(nullptr != m_context->eventItemsManager());
301  int smallest = layer();
303  itEnd = m_context->eventItemsManager()->end();
304  it != itEnd;
305  ++it) {
306  if ((*it) && (*it != this) && (*it)->layer() < smallest) {
307  smallest = (*it)->layer();
308  }
309  }
310 
311  if (smallest <= layer()) {
312  m_layer = std::max(smallest - 1, minLayerValue());
313  }
314 
315  m_itemInfos.clear();
316  m_accessor->reset();
317  handleChange();
318 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const fireworks::Context * m_context
Definition: FWEventItem.h:207
assert(be >=bs)
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
static int minLayerValue()
Definition: FWEventItem.cc:38
int layer() const
Definition: FWEventItem.cc:405
void handleChange()
Definition: FWEventItem.cc:341
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
const_iterator end() const
std::vector< FWEventItem * >::const_iterator const_iterator

◆ moveToFront()

void FWEventItem::moveToFront ( )

change layering

Definition at line 278 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToFront().

278  {
279  assert(nullptr != m_context->eventItemsManager());
280  int largest = layer();
282  itEnd = m_context->eventItemsManager()->end();
283  it != itEnd;
284  ++it) {
285  if ((*it) && (*it != this) && (*it)->layer() > largest) {
286  largest = (*it)->layer();
287  }
288  }
289 
290  if (largest >= layer()) {
291  m_layer = std::min(largest + 1, maxLayerValue());
292  }
293 
294  m_itemInfos.clear();
295  m_accessor->reset();
296  handleChange();
297 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const fireworks::Context * m_context
Definition: FWEventItem.h:207
assert(be >=bs)
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
static int maxLayerValue()
Definition: FWEventItem.cc:40
int layer() const
Definition: FWEventItem.cc:405
void handleChange()
Definition: FWEventItem.cc:341
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
const_iterator end() const
std::vector< FWEventItem * >::const_iterator const_iterator

◆ moveToLayer()

void FWEventItem::moveToLayer ( int  layer)

Definition at line 320 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::moveToLayer().

320  {
321  assert(nullptr != m_context->eventItemsManager());
322 
324 
325  m_itemInfos.clear();
326  m_accessor->reset();
327  handleChange();
328 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
const fireworks::Context * m_context
Definition: FWEventItem.h:207
assert(be >=bs)
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
static int maxLayerValue()
Definition: FWEventItem.cc:40
static int minLayerValue()
Definition: FWEventItem.cc:38
int layer() const
Definition: FWEventItem.cc:405
void handleChange()
Definition: FWEventItem.cc:341
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ name()

const std::string & FWEventItem::name ( void  ) const

◆ processName()

const std::string & FWEventItem::processName ( ) const

Definition at line 444 of file FWEventItem.cc.

References m_processName.

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

444 { return m_processName; }
std::string m_processName
Definition: FWEventItem.h:220

◆ productInstanceLabel()

const std::string & FWEventItem::productInstanceLabel ( ) const

Definition at line 442 of file FWEventItem.cc.

References m_productInstanceLabel.

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

442 { return m_productInstanceLabel; }
std::string m_productInstanceLabel
Definition: FWEventItem.h:219

◆ proxyConfigChanged()

void FWEventItem::proxyConfigChanged ( bool  k = false)

Definition at line 330 of file FWEventItem.cc.

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

Referenced by FWProxyBuilderConfiguration::assertParam().

330  {
331  if (!k) {
332  m_itemInfos.clear();
333  m_accessor->reset();
335  handleChange();
336  } else {
337  changeManager()->changed(this);
338  }
339 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
const fireworks::Context * m_context
Definition: FWEventItem.h:207
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
void changed(const FWModelId &)
void handleChange()
Definition: FWEventItem.cc:341
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ purpose()

const std::string & FWEventItem::purpose ( ) const

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

Definition at line 439 of file FWEventItem.cc.

References m_purpose.

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

439 { return m_purpose; }
std::string m_purpose
Definition: FWEventItem.h:211

◆ resetColor()

void FWEventItem::resetColor ( )

Definition at line 550 of file FWEventItem.cc.

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

550  {
552 
553  FWChangeSentry sentry(*(this->changeManager()));
554  for (int index = 0; index < static_cast<int>(size()); ++index) {
555  m_itemInfos.at(index).m_displayProperties.setColor(m_origColor);
556  FWModelId id(this, index);
557  changeManager()->changed(id);
558  }
559 
561 }
size_t size() const
Definition: FWEventItem.cc:457
void setColor(Color_t iColor)
Color_t m_origColor
Definition: FWEventItem.h:230
unsigned int id() const
Definition: FWEventItem.cc:433
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
void changed(const FWModelId &)
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ runFilter()

void FWEventItem::runFilter ( )
private

Definition at line 186 of file FWEventItem.cc.

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

Referenced by handleChange(), and setFilterExpression().

186  {
187  if (m_accessor->isCollection() && m_accessor->data()) {
188  //std::cout <<"runFilter"<<std::endl;
189  FWChangeSentry sentry(*(this->changeManager()));
190  int size = m_accessor->size();
191  std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin();
192  try {
193  for (int index = 0; index != size; ++index, ++itInfo) {
194  bool changed = false;
195  bool wasVisible = itInfo->m_displayProperties.isVisible();
196  if (not m_filter.passesFilter(m_accessor->modelData(index))) {
197  itInfo->m_displayProperties.setIsVisible(false);
198  changed = wasVisible == true;
199  } else {
200  itInfo->m_displayProperties.setIsVisible(true);
201  changed = wasVisible == false;
202  }
203  if (changed) {
204  FWModelId id(this, index);
205  changeManager()->changed(id);
206  }
207  }
208  } catch (const std::exception& iException) {
209  //Should log this error
210  std::cerr << "Exception occurred while running filter on " << name() << "\n" << iException.what() << std::endl;
211  }
212  }
213 }
size_t size() const
Definition: FWEventItem.cc:457
unsigned int id() const
Definition: FWEventItem.cc:433
bool passesFilter(const void *) const
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
FWModelFilter m_filter
Definition: FWEventItem.h:225
void changed(const FWModelId &)
const std::string & name() const
Definition: FWEventItem.cc:435
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ select()

void FWEventItem::select ( int  iIndex) const

Definition at line 224 of file FWEventItem.cc.

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

Referenced by FWHistSliceSelector::doSelect(), FWHGTowerSliceSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), FWModelExpressionSelector::select(), FWModelId::select(), CmsShowEDI::selectAll(), and FWSecondarySelectableSelector::syncSelection().

224  {
225  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
226  if (not sel) {
227  sel = true;
228  FWModelId id(this, iIndex);
229  selectionManager()->select(id);
230  //want to make it obvious what type of object was selected
231  // therefore we also select the item
232  const_cast<FWEventItem*>(this)->selectItem();
233  changeManager()->changed(id);
234  }
235 }
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:433
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void changed(const FWModelId &)
void selectItem()
Definition: FWEventItem.cc:514
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ selectionManager()

FWSelectionManager* FWEventItem::selectionManager ( ) const
inline

◆ selectItem()

void FWEventItem::selectItem ( )

Select the item (i.e. container) itself

Definition at line 514 of file FWEventItem.cc.

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

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

514  {
515  if (!m_isSelected) {
516  m_isSelected = true;
517  selectionManager()->selectItem(this);
519  }
520 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
bool m_isSelected
Definition: FWEventItem.h:229
void selectItem(FWEventItem *)

◆ setData()

void FWEventItem::setData ( const edm::ObjectWithDict iData) const

Definition at line 385 of file FWEventItem.cc.

References m_accessor, m_displayProperties, and m_itemInfos.

Referenced by data().

385  {
386  m_accessor->setData(iData);
387  //std::cout <<"size "<<m_accessor->size()<<std::endl;
388  if (m_accessor->isCollection()) {
389  m_itemInfos.reserve(m_accessor->size());
390  m_itemInfos.resize(m_accessor->size(), ModelInfo(m_displayProperties, false));
391  } else {
392  m_itemInfos.push_back(ModelInfo(m_displayProperties, false));
393  }
394 }
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ setDefaultDisplayProperties()

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 138 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().

138  {
139  bool visChange = m_displayProperties.isVisible() != iProp.isVisible();
140  bool colorChanged = m_displayProperties.color() != iProp.color();
141  bool transparencyChanged = m_displayProperties.transparency() != iProp.transparency();
142 
143  if (!visChange && !colorChanged && !transparencyChanged) {
144  return;
145  }
146  //If the default visibility is changed, we want to also change the the visibility of the children
147  // BUT we want to remember the old visibility so if the visibility is changed again we return
148  // to the previous state.
149  // only the visible ones need to be marked as 'changed'
150  FWChangeSentry sentry(*(changeManager()));
151 
152  for (int index = 0; index < static_cast<int>(size()); ++index) {
153  FWDisplayProperties prp = m_itemInfos[index].displayProperties();
154  bool vis = prp.isVisible();
155  bool changed = false;
156  changed = visChange && vis;
157 
158  if (colorChanged) {
159  if (m_displayProperties.color() == prp.color()) {
160  prp.setColor(iProp.color());
161  changed = true;
162  }
163  }
164  if (transparencyChanged) {
166  prp.setTransparency(iProp.transparency());
167  changed = true;
168  }
169  }
170  if (changed) {
171  m_itemInfos[index].m_displayProperties = prp;
172  FWModelId id(this, index);
173  changeManager()->changed(id);
174  }
175  }
176  m_displayProperties = iProp;
178 }
size_t size() const
Definition: FWEventItem.cc:457
void setColor(Color_t iColor)
unsigned int id() const
Definition: FWEventItem.cc:433
Char_t transparency() const
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
void changed(const FWModelId &)
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
void setTransparency(Char_t transparency)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ setDisplayProperties()

void FWEventItem::setDisplayProperties ( int  iIndex,
const FWDisplayProperties iProps 
) const

Definition at line 247 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(), and FWModelExpressionSelector::select().

247  {
248  FWDisplayProperties& prop = m_itemInfos.at(iIndex).m_displayProperties;
250  if (prop != iProps) {
251  prop = iProps;
252  FWModelId id(this, iIndex);
253  //selectionManager()->select(id);
254  changeManager()->changed(id);
255  }
256  } else {
257  if (iProps.isVisible()) {
258  FWChangeSentry sentry(*(this->changeManager()));
259  int size = m_accessor->size();
260  std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin();
261  for (int index = 0; index != size; ++index, ++itInfo) {
262  if (itInfo->m_displayProperties.isVisible()) {
263  itInfo->m_displayProperties.setIsVisible(false);
264  FWModelId id(this, index);
265  changeManager()->changed(id);
266  }
267  }
268  m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(true);
269  FWModelId id(this, iIndex);
270  changeManager()->changed(id);
271  const_cast<FWEventItem*>(this)->m_displayProperties.setIsVisible(true);
272  //NOTE: need to send out a signal here
274  }
275  }
276 }
size_t size() const
Definition: FWEventItem.cc:457
unsigned int id() const
Definition: FWEventItem.cc:433
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
void changed(const FWModelId &)
FWDisplayProperties m_displayProperties
Definition: FWEventItem.h:213
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215
void setIsVisible(bool iSet)

◆ setEvent()

void FWEventItem::setEvent ( const edm::EventBase iEvent)

Definition at line 111 of file FWEventItem.cc.

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

111  {
112  m_printedErrorThisEvent = false;
113  m_event = iEvent;
114  m_accessor->reset();
115  m_itemInfos.clear();
116  handleChange();
117 }
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
int iEvent
Definition: GenABIO.cc:224
bool m_printedErrorThisEvent
Definition: FWEventItem.h:226
void handleChange()
Definition: FWEventItem.cc:341
const edm::EventBase * m_event
Definition: FWEventItem.h:221
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ setFilterExpression()

void FWEventItem::setFilterExpression ( const std::string &  iExpression)

Throws an FWExpresionException if there is a problem with the expression

Definition at line 180 of file FWEventItem.cc.

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

Referenced by CmsShowEDI::runFilter().

180  {
181  m_filter.setExpression(iExpression);
182  filterChanged_(this);
183  runFilter();
184 }
FWModelFilter m_filter
Definition: FWEventItem.h:225
void setExpression(const std::string &)
void runFilter()
Definition: FWEventItem.cc:186
FWItemChangeSignal filterChanged_
Definition: FWEventItem.h:193

◆ setLabels()

void FWEventItem::setLabels ( const std::string &  iModule,
const std::string &  iProductInstance,
const std::string &  iProcess 
)

Definition at line 119 of file FWEventItem.cc.

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

121  {
122  m_moduleLabel = iModule;
123  m_productInstanceLabel = iProductInstance;
124  m_processName = iProcess;
125  m_accessor->reset();
126  m_itemInfos.clear();
127  handleChange();
128 }
std::string m_moduleLabel
Definition: FWEventItem.h:218
std::shared_ptr< FWItemAccessorBase > m_accessor
Definition: FWEventItem.h:212
std::string m_processName
Definition: FWEventItem.h:220
void handleChange()
Definition: FWEventItem.cc:341
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215
std::string m_productInstanceLabel
Definition: FWEventItem.h:219

◆ setName()

void FWEventItem::setName ( const std::string &  iName)

Definition at line 130 of file FWEventItem.cc.

References m_name.

130 { m_name = iName; }
std::string m_name
Definition: FWEventItem.h:209

◆ size()

size_t FWEventItem::size ( void  ) const

Definition at line 457 of file FWEventItem.cc.

References getPrimaryData(), and m_itemInfos.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::build(), FWSimpleProxyBuilderTemplate< TrajectorySeed >::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(), and FWSecondarySelectableSelector::syncSelection().

457  {
458  getPrimaryData();
459  return m_itemInfos.size();
460 }
void getPrimaryData() const
Definition: FWEventItem.cc:396
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ toggleSelect()

void FWEventItem::toggleSelect ( int  iIndex) const

Definition at line 236 of file FWEventItem.cc.

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

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

236  {
237  bool& sel = m_itemInfos.at(iIndex).m_isSelected;
238  sel = not sel;
239  FWModelId id(this, iIndex);
240  if (sel)
241  selectionManager()->select(id);
242  else
243  selectionManager()->unselect(id);
244  changeManager()->changed(id);
245 }
void select(const FWModelId &iId)
unsigned int id() const
Definition: FWEventItem.cc:433
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void unselect(const FWModelId &iId)
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ toggleSelectItem()

void FWEventItem::toggleSelectItem ( )

Definition at line 528 of file FWEventItem.cc.

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

528  {
530  if (m_isSelected) {
531  selectionManager()->selectItem(this);
532  } else {
534  }
536 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void unselectItem(FWEventItem *)
bool m_isSelected
Definition: FWEventItem.h:229
void selectItem(FWEventItem *)

◆ type()

const TClass * FWEventItem::type ( ) const

Definition at line 437 of file FWEventItem.cc.

References m_type.

Referenced by data(), CmsShowEDI::fillEDIFrame(), FWFileEntry::getBranchName(), and FWEveViewManager::newItem().

437 { return m_type; }
const TClass * m_type
Definition: FWEventItem.h:210

◆ unselect()

void FWEventItem::unselect ( int  iIndex) const

Definition at line 215 of file FWEventItem.cc.

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

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

215  {
216  //check if this is a change
217  if (bool& sel = m_itemInfos.at(iIndex).m_isSelected) {
218  sel = false;
219  FWModelId id(this, iIndex);
220  selectionManager()->unselect(id);
221  changeManager()->changed(id);
222  }
223 }
unsigned int id() const
Definition: FWEventItem.cc:433
FWModelChangeManager * changeManager() const
Definition: FWEventItem.h:123
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void unselect(const FWModelId &iId)
void changed(const FWModelId &)
std::vector< ModelInfo > m_itemInfos
Definition: FWEventItem.h:215

◆ unselectItem()

void FWEventItem::unselectItem ( )

Definition at line 521 of file FWEventItem.cc.

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

Referenced by destroy().

521  {
522  if (m_isSelected) {
523  m_isSelected = false;
526  }
527 }
FWItemChangeSignal defaultDisplayPropertiesChanged_
Definition: FWEventItem.h:190
FWSelectionManager * selectionManager() const
Definition: FWEventItem.h:124
void unselectItem(FWEventItem *)
bool m_isSelected
Definition: FWEventItem.h:229

◆ valueGetter()

const FWItemValueGetter& FWEventItem::valueGetter ( ) const
inline

Member Data Documentation

◆ changed_

FWModelChangeSignal FWEventItem::changed_
mutable

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

Definition at line 178 of file FWEventItem.h.

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

◆ defaultDisplayPropertiesChanged_

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 190 of file FWEventItem.h.

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

◆ filterChanged_

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 193 of file FWEventItem.h.

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

◆ goingToBeDestroyed_

FWItemChangeSignal FWEventItem::goingToBeDestroyed_
mutable

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

Definition at line 197 of file FWEventItem.h.

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

◆ itemChanged_

FWItemChangeSignal FWEventItem::itemChanged_
mutable

◆ m_accessor

std::shared_ptr<FWItemAccessorBase> FWEventItem::m_accessor
private

◆ m_context

const fireworks::Context* FWEventItem::m_context
private

◆ m_displayProperties

FWDisplayProperties FWEventItem::m_displayProperties
private

◆ m_errorMessage

std::string FWEventItem::m_errorMessage
mutableprivate

Definition at line 227 of file FWEventItem.h.

Referenced by data(), and errorMessage().

◆ m_event

const edm::EventBase* FWEventItem::m_event
private

Definition at line 221 of file FWEventItem.h.

Referenced by data(), getEvent(), hasEvent(), and setEvent().

◆ m_filter

FWModelFilter FWEventItem::m_filter
private

Definition at line 225 of file FWEventItem.h.

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

◆ m_id

unsigned int FWEventItem::m_id
private

Definition at line 208 of file FWEventItem.h.

Referenced by id().

◆ m_interestingValueGetter

FWItemValueGetter FWEventItem::m_interestingValueGetter
private

Definition at line 223 of file FWEventItem.h.

Referenced by modelInterestingValueAsString(), and valueGetter().

◆ m_isSelected

bool FWEventItem::m_isSelected
private

Definition at line 229 of file FWEventItem.h.

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

◆ m_itemInfos

std::vector<ModelInfo> FWEventItem::m_itemInfos
mutableprivate

◆ m_layer

int FWEventItem::m_layer
private

Definition at line 214 of file FWEventItem.h.

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

◆ m_moduleLabel

std::string FWEventItem::m_moduleLabel
private

Definition at line 218 of file FWEventItem.h.

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

◆ m_name

std::string FWEventItem::m_name
private

Definition at line 209 of file FWEventItem.h.

Referenced by name(), and setName().

◆ m_origColor

Color_t FWEventItem::m_origColor
private

Definition at line 230 of file FWEventItem.h.

Referenced by FWEventItem(), and resetColor().

◆ m_printedErrorThisEvent

bool FWEventItem::m_printedErrorThisEvent
mutableprivate

Definition at line 226 of file FWEventItem.h.

Referenced by data(), and setEvent().

◆ m_processName

std::string FWEventItem::m_processName
private

Definition at line 220 of file FWEventItem.h.

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

◆ m_productInstanceLabel

std::string FWEventItem::m_productInstanceLabel
private

Definition at line 219 of file FWEventItem.h.

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

◆ m_proxyBuilderConfig

FWProxyBuilderConfiguration* FWEventItem::m_proxyBuilderConfig
private

Definition at line 232 of file FWEventItem.h.

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

◆ m_purpose

std::string FWEventItem::m_purpose
private

Definition at line 211 of file FWEventItem.h.

Referenced by purpose().

◆ m_type

const TClass* FWEventItem::m_type
private

Definition at line 210 of file FWEventItem.h.

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

◆ m_wrapperType

edm::TypeWithDict FWEventItem::m_wrapperType
private

Definition at line 222 of file FWEventItem.h.

◆ preItemChanged_

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 186 of file FWEventItem.h.

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