#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 *) | |
void | newEvent (const edm::EventBase *iEvent) |
void | setContext (fireworks::Context *) |
void | setFrom (const FWConfiguration &) override |
~FWEventItemsManager () override | |
Public Member Functions inherited from FWConfigurable | |
FWConfigurable () | |
virtual | ~FWConfigurable () |
Public Attributes | |
sigc::signal< void > | goingToClearItems_ |
sigc::signal< void, FWEventItem * > | newItem_ |
sigc::signal< void, const FWEventItem * > | removingItem_ |
Private Member Functions | |
FWEventItemsManager (const FWEventItemsManager &)=delete | |
const FWEventItemsManager & | operator= (const FWEventItemsManager &)=delete |
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 51 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 60 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, and m_items.
|
privatedelete |
FWEventItem * FWEventItemsManager::add | ( | const FWPhysicsObjectDesc & | iItem, |
const FWConfiguration * | pbConf = nullptr , |
||
bool | doSetEvent = true |
||
) |
Definition at line 84 of file FWEventItemsManager.cc.
References FWDisplayProperties::color(), FWColorManager::colorHasIndex(), fireworks::Context::colorManager(), FWPhysicsObjectDesc::displayProperties(), fwLog, FWColorManager::getDefaultStartColorIndex(), fwlog::kWarning, m_accessorFactory, m_changeManager, m_context, m_event, m_items, newItem_, removeItem(), FWPhysicsObjectDesc::setDisplayProperties(), groupFilesInBlocks::temp, and FWPhysicsObjectDesc::type().
Referenced by FWGUIEventDataAdder::addNewItem(), counter.Counter::register(), SequenceTypes.Task::remove(), SequenceTypes.Task::replace(), and setFrom().
|
overridevirtual |
Implements FWConfigurable.
Definition at line 160 of file FWEventItemsManager.cc.
References FWConfiguration::addKeyValue(), fireworks::Context::colorManager(), MergeFilesAndCalculateEfficiencies_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 334 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 131 of file FWEventItemsManager.cc.
References FWEventItem::destroy(), MillePedeFileConverter_cfg::e, goingToClearItems_, mps_fire::i, kColor(), kFalse(), kFilterExpression(), kIsVisible(), kLayer(), kModuleLabel(), kProcessName(), kProductInstanceLabel(), kPurpose(), kTransparency(), kTrue(), kType(), m_items, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FWPartialConfigLoadGUI::Load(), and setFrom().
FWEventItemsManager::const_iterator FWEventItemsManager::end | ( | void | ) | const |
Definition at line 339 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 347 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, m_items, and FWEventItem::name().
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 113 of file FWEventItemsManager.cc.
References MillePedeFileConverter_cfg::e, mps_fire::i, iEvent, m_changeManager, m_event, m_items, and FWEventItem::setEvent().
|
privatedelete |
|
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 317 of file FWEventItemsManager.cc.
References FWEventItem::id(), m_items, and removingItem_.
Referenced by add().
void FWEventItemsManager::setContext | ( | fireworks::Context * | iContext | ) |
Definition at line 325 of file FWEventItemsManager.cc.
References m_context.
Referenced by CmsShowMain::CmsShowMain().
|
overridevirtual |
This is responsible for resetting the status of items from configuration
Implements FWConfigurable.
Definition at line 207 of file FWEventItemsManager.cc.
References add(), FWConfiguration::addKeyValue(), clearItems(), create_public_lumi_plots::color, fireworks::Context::colorManager(), reco::dp, FWConfiguration::keyValues(), kTrue(), m_changeManager, m_context, m_event, dataset::name, FWColorManager::oldColorToIndex(), modifiedElectrons_cfi::processName, trackingPlots::purpose, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, FWConfiguration::valueForKey(), and FWConfiguration::version().
sigc::signal<void> FWEventItemsManager::goingToClearItems_ |
Definition at line 77 of file FWEventItemsManager.h.
Referenced by clearItems(), FWSummaryManager::FWSummaryManager(), and CmsShowMainBase::setupViewManagers().
|
private |
Definition at line 92 of file FWEventItemsManager.h.
Referenced by add().
|
private |
Definition at line 88 of file FWEventItemsManager.h.
Referenced by add(), newEvent(), and setFrom().
|
private |
Definition at line 89 of file FWEventItemsManager.h.
Referenced by add(), addTo(), setContext(), and setFrom().
|
private |
Definition at line 91 of file FWEventItemsManager.h.
Referenced by add(), newEvent(), and setFrom().
|
private |
Definition at line 87 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 75 of file FWEventItemsManager.h.
Referenced by add(), FWGUIManager::FWGUIManager(), FWSummaryManager::FWSummaryManager(), and FWFileEntry::openFile().
sigc::signal<void, const FWEventItem*> FWEventItemsManager::removingItem_ |
Definition at line 76 of file FWEventItemsManager.h.
Referenced by removeItem().