#include <Fireworks/Core/interface/FWEventItemsManager.h>
Public Types | |
typedef std::vector < FWEventItem * > ::const_iterator | const_iterator |
Public Member Functions | |
const FWEventItem * | add (const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=0) |
void | addTo (FWConfiguration &) const |
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 &) |
virtual | ~FWEventItemsManager () |
Public Member Functions inherited from FWConfigurable | |
FWConfigurable () | |
virtual | ~FWConfigurable () |
Public Attributes | |
sigc::signal< void > | goingToClearItems_ |
sigc::signal< void, FWEventItem * > | newItem_ |
Private Member Functions | |
FWEventItemsManager (const FWEventItemsManager &) | |
const FWEventItemsManager & | operator= (const FWEventItemsManager &) |
void | removeItem (const FWEventItem *) |
Private Attributes | |
boost::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.
|
virtual |
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 alignCSCRings::e, i, and m_items.
|
private |
const FWEventItem * FWEventItemsManager::add | ( | const FWPhysicsObjectDesc & | iItem, |
const FWConfiguration * | pbConf = 0 |
||
) |
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(), and setFrom().
|
virtual |
Implements FWConfigurable.
Definition at line 157 of file FWEventItemsManager.cc.
References FWConfiguration::addKeyValue(), fireworks::Context::colorManager(), dbtoconf::conf, dtTPAnalyzer_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 321 of file FWEventItemsManager.cc.
References m_items.
Referenced by FWGUIEventDataAdder::addNewItem(), FWEventItem::isInBack(), FWEventItem::isInFront(), FWEventItem::moveToBack(), FWEventItem::moveToFront(), FWFileEntry::runFilter(), 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 128 of file FWEventItemsManager.cc.
References FWEventItem::destroy(), alignCSCRings::e, goingToClearItems_, i, and m_items.
Referenced by setFrom().
FWEventItemsManager::const_iterator FWEventItemsManager::end | ( | void | ) | const |
Definition at line 326 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(), FWFileEntry::runFilter(), and CmsShowMain::setupDataHandling().
const FWEventItem * FWEventItemsManager::find | ( | const std::string & | iName | ) | const |
Look up an item by name.
Definition at line 334 of file FWEventItemsManager.cc.
References alignCSCRings::e, 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 110 of file FWEventItemsManager.cc.
References alignCSCRings::e, i, iEvent, m_changeManager, m_event, m_items, and FWEventItem::setEvent().
|
private |
|
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 305 of file FWEventItemsManager.cc.
References FWEventItem::id(), and m_items.
Referenced by add().
void FWEventItemsManager::setContext | ( | fireworks::Context * | iContext | ) |
Definition at line 312 of file FWEventItemsManager.cc.
References m_context.
Referenced by CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), and FWFFService::FWFFService().
|
virtual |
This is responsible for resetting the status of items from configuration
Implements FWConfigurable.
Definition at line 204 of file FWEventItemsManager.cc.
References add(), FWConfiguration::addKeyValue(), clearItems(), create_public_lumi_plots::color, fireworks::Context::colorManager(), dbtoconf::conf, FWConfiguration::keyValues(), kTrue(), m_context, mergeVDriftHistosByStation::name, FWColorManager::oldColorToIndex(), 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 89 of file FWEventItemsManager.h.
Referenced by add().
|
private |
Definition at line 85 of file FWEventItemsManager.h.
Referenced by add(), and newEvent().
|
private |
Definition at line 86 of file FWEventItemsManager.h.
Referenced by add(), addTo(), setContext(), and setFrom().
|
private |
Definition at line 88 of file FWEventItemsManager.h.
Referenced by add(), and newEvent().
|
private |
Definition at line 84 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 74 of file FWEventItemsManager.h.
Referenced by add(), FWGUIManager::FWGUIManager(), and FWSummaryManager::FWSummaryManager().