#include <Fireworks/Core/interface/FWEventItemsManager.h>
Public Types | |
typedef std::vector< FWEventItem * >::const_iterator | const_iterator |
Public Member Functions | |
FWEventItem * | add (const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=nullptr, bool doSetEvent=true) |
void | addTo (FWConfiguration &) const override |
const_iterator | begin () const |
NOTE: iterator is allowed to return a null object for items that have been removed. More... | |
void | clearItems () |
const_iterator | end () const |
const FWEventItem * | find (const std::string &iName) const |
FWEventItemsManager (FWModelChangeManager *) | |
FWEventItemsManager (const FWEventItemsManager &)=delete | |
void | newEvent (const edm::EventBase *iEvent) |
const FWEventItemsManager & | operator= (const FWEventItemsManager &)=delete |
void | setContext (fireworks::Context *) |
void | setFrom (const FWConfiguration &) override |
~FWEventItemsManager () override | |
Public Member Functions inherited from FWConfigurable | |
FWConfigurable () | |
FWConfigurable (const FWConfigurable &)=delete | |
const FWConfigurable & | operator= (const FWConfigurable &)=delete |
virtual | ~FWConfigurable () |
Public Attributes | |
sigc::signal< void()> | goingToClearItems_ |
sigc::signal< void(FWEventItem *)> | newItem_ |
sigc::signal< void(const FWEventItem *)> | removingItem_ |
Private Member Functions | |
void | removeItem (const FWEventItem *) |
Private Attributes | |
std::shared_ptr< FWItemAccessorFactory > | m_accessorFactory |
FWModelChangeManager * | m_changeManager |
fireworks::Context * | m_context |
const edm::EventBase * | m_event |
std::vector< FWEventItem * > | m_items |
Description: Manages multiple FWEventItems
Usage: <usage>
Definition at line 44 of file FWEventItemsManager.h.
typedef std::vector<FWEventItem*>::const_iterator FWEventItemsManager::const_iterator |
Definition at line 50 of file FWEventItemsManager.h.
FWEventItemsManager::FWEventItemsManager | ( | FWModelChangeManager * | iManager | ) |
Definition at line 41 of file FWEventItemsManager.cc.
|
override |
FWEventItemsManager has ownership of the items it contains.
Note that because of the way we keep track of removed items, m_items[i] could actually be 0 for indices corresponding to removed items.
Definition at line 55 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, and m_items.
|
delete |
FWEventItem * FWEventItemsManager::add | ( | const FWPhysicsObjectDesc & | iItem, |
const FWConfiguration * | pbConf = nullptr , |
||
bool | doSetEvent = true |
||
) |
Definition at line 77 of file FWEventItemsManager.cc.
References FWColorManager::colorHasIndex(), fireworks::Context::colorManager(), fwLog, FWColorManager::getDefaultStartColorIndex(), fwlog::kWarning, m_accessorFactory, m_changeManager, m_context, m_event, m_items, newItem_, removeItem(), and groupFilesInBlocks::temp.
Referenced by FWGUIEventDataAdder::addNewItem(), counter.Counter::register(), SequenceTypes._TaskBase::remove(), SequenceTypes._TaskBase::replace(), and setFrom().
|
overridevirtual |
Implements FWConfigurable.
Definition at line 143 of file FWEventItemsManager.cc.
References FWConfiguration::addKeyValue(), cms::cuda::assert(), fireworks::Context::colorManager(), DTskim_cfg::dataType, kColor(), kFalse(), kFilterExpression(), kIsVisible(), kLayer(), kModuleLabel(), kProcessName(), kProductInstanceLabel(), kPurpose(), kTransparency(), kTrue(), kType(), m_context, and m_items.
FWEventItemsManager::const_iterator FWEventItemsManager::begin | ( | void | ) | const |
NOTE: iterator is allowed to return a null object for items that have been removed.
Definition at line 299 of file FWEventItemsManager.cc.
References m_items.
Referenced by FWGUIEventDataAdder::addNewItem(), FWEventItem::isInBack(), FWEventItem::isInFront(), FWEventItem::moveToBack(), FWEventItem::moveToFront(), CmsShowCommon::permuteColors(), CmsShowCommon::randomizeColors(), FWFileEntry::runFilter(), CmsShowCommon::setPalette(), and CmsShowMain::setupDataHandling().
void FWEventItemsManager::clearItems | ( | void | ) |
Clear all the items in the model.
Notice that a previous implementation was setting all the items to 0, I guess to track accessing delete items.
Definition at line 117 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, goingToClearItems_, mps_fire::i, B2GTnPMonitor_cfi::item, and m_items.
Referenced by FWPartialConfigLoadGUI::Load(), and setFrom().
FWEventItemsManager::const_iterator FWEventItemsManager::end | ( | void | ) | const |
Definition at line 300 of file FWEventItemsManager.cc.
References m_items.
Referenced by FWGUIEventDataAdder::addNewItem(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), FWEventItem::isInBack(), FWEventItem::isInFront(), FWEventItem::moveToBack(), FWEventItem::moveToFront(), CmsShowCommon::permuteColors(), CmsShowCommon::randomizeColors(), FWFileEntry::runFilter(), CmsShowCommon::setPalette(), and CmsShowMain::setupDataHandling().
const FWEventItem * FWEventItemsManager::find | ( | const std::string & | iName | ) | const |
Look up an item by name.
Definition at line 304 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, B2GTnPMonitor_cfi::item, and m_items.
Referenced by FWGUIEventDataAdder::addNewItem().
void FWEventItemsManager::newEvent | ( | const edm::EventBase * | iEvent | ) |
Prepare to handle a new event by associating all the items to watch it.
Definition at line 102 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, iEvent, B2GTnPMonitor_cfi::item, m_changeManager, m_event, and m_items.
|
delete |
|
private |
Remove one item.
Notice that rather than erasing the item from the list, it is preferred to set it to zero, I guess to catch accesses to remove items and to avoid having to recalculate the current selection.
GE: I think this is a broken way of handling removal of objects. The object should be properly deleted and the current selection should be updated accordingly.
Definition at line 288 of file FWEventItemsManager.cc.
References cms::cuda::assert(), FWEventItem::id(), m_items, and removingItem_.
Referenced by add().
void FWEventItemsManager::setContext | ( | fireworks::Context * | iContext | ) |
Definition at line 294 of file FWEventItemsManager.cc.
References m_context.
Referenced by CmsShowMain::CmsShowMain(), and FWFFLooper::FWFFLooper().
|
overridevirtual |
This is responsible for resetting the status of items from configuration
Implements FWConfigurable.
Definition at line 186 of file FWEventItemsManager.cc.
References add(), FWConfiguration::addKeyValue(), cms::cuda::assert(), clearItems(), fireworks::Context::colorManager(), submitPVResolutionJobs::desc, Calorimetry_cff::dp, FWConfiguration::keyValues(), kTrue(), phase1PixelTopology::layer, m_changeManager, m_context, m_event, HerwigMaxPtPartonFilter_cfi::moduleLabel, Skims_PA_cff::name, FWColorManager::oldColorToIndex(), SimL1EmulatorRepack_CalouGT_cff::processName, hgcalPlots::purpose, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, FWConfiguration::valueForKey(), and FWConfiguration::version().
sigc::signal<void()> FWEventItemsManager::goingToClearItems_ |
Definition at line 75 of file FWEventItemsManager.h.
Referenced by clearItems(), FWSummaryManager::FWSummaryManager(), and CmsShowMainBase::setupViewManagers().
|
private |
Definition at line 90 of file FWEventItemsManager.h.
Referenced by add().
|
private |
Definition at line 86 of file FWEventItemsManager.h.
Referenced by add(), newEvent(), and setFrom().
|
private |
Definition at line 87 of file FWEventItemsManager.h.
Referenced by add(), addTo(), setContext(), and setFrom().
|
private |
Definition at line 89 of file FWEventItemsManager.h.
Referenced by add(), newEvent(), and setFrom().
|
private |
Definition at line 85 of file FWEventItemsManager.h.
Referenced by add(), addTo(), begin(), clearItems(), end(), find(), newEvent(), removeItem(), and ~FWEventItemsManager().
sigc::signal<void(FWEventItem*)> FWEventItemsManager::newItem_ |
Definition at line 73 of file FWEventItemsManager.h.
Referenced by add(), FWGUIManager::FWGUIManager(), FWSummaryManager::FWSummaryManager(), and FWFileEntry::openFile().
sigc::signal<void(const FWEventItem*)> FWEventItemsManager::removingItem_ |
Definition at line 74 of file FWEventItemsManager.h.
Referenced by removeItem().