#include <Fireworks/Core/interface/FWEventItem.h>
Classes | |
struct | ModelInfo |
Public Member Functions | |
FWModelChangeManager * | changeManager () const |
FWColorManager * | colorManager () const |
const fireworks::Context & | context () const |
const void * | data (const std::type_info &) const |
const FWDisplayProperties & | defaultDisplayProperties () const |
void | destroy () const |
const std::string & | errorMessage () const |
returns error string if there was a problem this event | |
const std::string & | filterExpression () const |
FWEventItem (fireworks::Context *iContext, unsigned int iItemId, boost::shared_ptr< FWItemAccessorBase > iAccessor, const FWPhysicsObjectDesc &iDesc) | |
template<class T > | |
void | get (const T *&oData) const |
const edm::EventBase * | getEvent () const |
const FWGeometry * | getGeom () const |
bool | hasError () const |
returns true if failed to get data for this event | |
bool | hasEvent () const |
bool | haveInterestingValue () const |
one value from the model which is normally used for the popup | |
unsigned int | id () const |
bool | isCollection () const |
bool | isInBack () const |
returns true if item is behind all other items | |
bool | isInFront () const |
returns true if item is in front of all other items | |
bool | itemIsSelected () const |
int | layer () const |
const void * | modelData (int iIndex) const |
ModelInfo | modelInfo (int iIndex) const |
double | modelInterestingValue (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 |
const std::string & | purpose () const |
void | select (int iIndex) const |
FWSelectionManager * | selectionManager () const |
void | selectItem () |
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 () |
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 | getPrimaryData () const |
void | handleChange () |
void | runFilter () |
void | setData (const Reflex::Object &) const |
Private Attributes | |
boost::shared_ptr < FWItemAccessorBase > | m_accessor |
const fireworks::Context * | m_context |
FWDisplayProperties | m_displayProperties |
std::string | m_errorMessage |
const edm::EventBase * | m_event |
FWModelFilter | m_filter |
unsigned int | m_id |
FWItemValueGetter | m_interestingValueGetter |
bool | m_isSelected |
std::vector< ModelInfo > | m_itemInfos |
int | m_layer |
std::string | m_moduleLabel |
std::string | m_name |
bool | m_printedErrorThisEvent |
std::string | m_processName |
std::string | m_productInstanceLabel |
std::string | m_purpose |
const TClass * | m_type |
ROOT::Reflex::Type | m_wrapperType |
Description: Stand in for a top level item in an Event
Usage: <usage>
Definition at line 55 of file FWEventItem.h.
FWEventItem::FWEventItem | ( | fireworks::Context * | iContext, |
unsigned int | iItemId, | ||
boost::shared_ptr< FWItemAccessorBase > | iAccessor, | ||
const FWPhysicsObjectDesc & | iDesc | ||
) |
Definition at line 65 of file FWEventItem.cc.
References m_accessor, m_filter, m_itemInfos, modelType(), and FWModelFilter::setClassName().
: m_context(iContext), m_id(iId), m_name(iDesc.name()), m_type(iDesc.type()), m_purpose(iDesc.purpose()), m_accessor(iAccessor), m_displayProperties(iDesc.displayProperties()), m_layer(iDesc.layer()), m_moduleLabel(iDesc.moduleLabel()), m_productInstanceLabel(iDesc.productInstanceLabel()), m_processName(iDesc.processName()), m_event(0), m_interestingValueGetter(ROOT::Reflex::Type::ByTypeInfo(*(m_accessor->modelType()->GetTypeInfo())), defaultMemberFunctionNames()), m_filter(iDesc.filterExpression(),""), m_printedErrorThisEvent(false), m_isSelected(false) { //assert(m_type->GetTypeInfo()); //ROOT::Reflex::Type dataType( ROOT::Reflex::Type::ByTypeInfo(*(m_type->GetTypeInfo()))); //assert(dataType != ROOT::Reflex::Type() ); // //std::string dataTypeName = dataType.Name(ROOT::Reflex::SCOPED); //if (dataTypeName[dataTypeName.size() -1] == '>') // dataTypeName += " "; //std::string wrapperName = "edm::Wrapper<" + dataTypeName + ">"; // //fwLog(fwlog::kDebug) << "Looking for the wrapper name" // << wrapperName << std::endl; //m_wrapperType = ROOT::Reflex::Type::ByName(wrapperName); // //assert(m_wrapperType != ROOT::Reflex::Type()); if(!m_accessor->isCollection()) { m_itemInfos.reserve(1); } m_filter.setClassName(modelType()->GetName()); }
FWModelChangeManager* FWEventItem::changeManager | ( | ) | const [inline] |
Definition at line 130 of file FWEventItem.h.
References m_context, and fireworks::Context::modelChangeManager().
Referenced by FWFromSliceSelector::changeManager(), destroy(), FWHFTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), handleChange(), FWCollectionSummaryWidget::modelSelected(), runFilter(), select(), FWModelExpressionSelector::select(), CmsShowEDI::selectAll(), setDefaultDisplayProperties(), setDisplayProperties(), toggleSelect(), and unselect().
{ return m_context->modelChangeManager(); }
FWColorManager* FWEventItem::colorManager | ( | ) | const [inline] |
Definition at line 137 of file FWEventItem.h.
References fireworks::Context::colorManager(), and m_context.
Referenced by FWCollectionSummaryWidget::colorClicked(), FWCollectionSummaryWidget::createColorPopup(), and FWCollectionSummaryWidget::itemColorClicked().
{ return m_context->colorManager(); }
const fireworks::Context& FWEventItem::context | ( | ) | const [inline] |
Definition at line 126 of file FWEventItem.h.
References m_context.
Referenced by FWCaloDataProxyBuilderBase::build(), FWProxyBuilderBase::context(), and FWDetailViewBase::context().
{ return *m_context; }
const void * FWEventItem::data | ( | const std::type_info & | iInfo | ) | const |
Definition at line 393 of file FWEventItem.cc.
References exception, edm::EventBase::getByLabel(), patZpeak::handle, m_accessor, m_errorMessage, m_event, m_moduleLabel, m_printedErrorThisEvent, m_processName, m_productInstanceLabel, m_type, name(), asciidump::s, setData(), and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by get(), FWHandle::getFrom(), and getPrimaryData().
{ using namespace Reflex; //At the moment this is a programming error assert(iInfo == *(m_type->GetTypeInfo())); //lookup data if we don't already have it if (m_accessor->data()) return m_accessor->data(); m_errorMessage.clear(); if (!m_event) return m_accessor->data(); // Retrieve the data from the event. edm::InputTag tag(m_moduleLabel, m_productInstanceLabel, m_processName); edm::FWGenericHandle handle(Reflex::Type::ByTypeInfo(iInfo)); try { m_event->getByLabel(tag, handle); setData(*handle); } catch (std::exception& iException) { if (!m_printedErrorThisEvent) { std::ostringstream s; s << "Failed to get " << name() << " because \n" <<iException.what(); m_errorMessage=s.str(); m_printedErrorThisEvent = true; } return 0; } return m_accessor->data(); }
const FWDisplayProperties & FWEventItem::defaultDisplayProperties | ( | ) | const |
Definition at line 452 of file FWEventItem.cc.
References m_displayProperties.
Referenced by FWInteractionList::added(), FWTrackHitsDetailView::addHits(), FWConvTrackHitsDetailView::addHits(), FWConvTrackHitsDetailView::addModules(), FWTrackHitsDetailView::addModules(), FWPFClusterRPZProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWJetProxyBuilder::buildViewType(), CmsShowEDI::changeItemColor(), CmsShowEDI::changeItemOpacity(), FWCollectionSummaryWidget::colorChangeRequested(), FWCollectionSummaryWidget::colorClicked(), CmsShowEDI::colorSetChanged(), FWCollectionSummaryWidget::createColorPopup(), FWProxyBuilderBase::createCompound(), FWCollectionSummaryWidget::displayChanged(), CmsShowEDI::fillEDIFrame(), fireworks::makeRhoPhiSuperCluster(), FWCollectionSummaryWidget::setBackgroundToWhite(), fireworks::setupAddElement(), FWPFBlockProxyBuilder::setupClusterElement(), FWProxyBuilderBase::setupElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), CmsShowEDI::toggleItemVisible(), FWCollectionSummaryWidget::toggleItemVisible(), and CmsShowEDI::updateDisplay().
{ return m_displayProperties; }
void FWEventItem::destroy | ( | ) | const |
Definition at line 615 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), goingToBeDestroyed_, id(), getHLTprescales::index, m_itemInfos, selectionManager(), size(), FWSelectionManager::unselect(), and unselectItem().
Referenced by FWEventItemsManager::clearItems(), and CmsShowEDI::removeItem().
{ //NOTE: need to unselect first before announcing destruction // because some items are listening to the display change and may // not properly release their connection to that signal after they // are destroyed via a connection to goingToBeDestroyed_ const_cast<FWEventItem*>(this)->unselectItem(); { FWChangeSentry sentry(*(changeManager())); for(int index=0; index <static_cast<int>(size()); ++index) { if(m_itemInfos.at(index).m_isSelected) { FWModelId id(this,index); selectionManager()->unselect(id); changeManager()->changed(id); } } } goingToBeDestroyed_(this); delete this; }
const std::string & FWEventItem::errorMessage | ( | ) | const |
returns error string if there was a problem this event
Definition at line 679 of file FWEventItem.cc.
References getPrimaryData(), and m_errorMessage.
Referenced by hasError(), and FWCollectionSummaryWidget::itemChanged().
{ if(m_errorMessage.empty()) { getPrimaryData(); } return m_errorMessage; }
const std::string & FWEventItem::filterExpression | ( | ) | const |
Definition at line 609 of file FWEventItem.cc.
References FWModelFilter::expression(), and m_filter.
Referenced by CmsShowEDI::fillEDIFrame(), FWCollectionSummaryWidget::itemChanged(), and CmsShowEDI::updateFilter().
{ return m_filter.expression(); }
void FWEventItem::get | ( | const T *& | oData | ) | const [inline] |
Definition at line 84 of file FWEventItem.h.
References data().
Referenced by FWCastorRecHitProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWCaloTowerProxyBuilderBase::build(), FWSiPixelClusterProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWHFTowerProxyBuilderBase::build(), FWPCaloHitProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWHBHERecHitProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWHORecHitProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), FWPFTauProxyBuilder::buildViewType(), FWCaloTauProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWHFTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWEcalRecHitProxyBuilder::scaleProduct(), and FWHBHERecHitProxyBuilder::scaleProduct().
{ oData=reinterpret_cast<const T*>(data(typeid(T))); }
const edm::EventBase* FWEventItem::getEvent | ( | ) | const [inline] |
Definition at line 146 of file FWEventItem.h.
References m_event.
Referenced by FWSimTrackProxyBuilder::getVertices().
{ return m_event; }
const FWGeometry * FWEventItem::getGeom | ( | ) | const |
Definition at line 688 of file FWEventItem.cc.
References fireworks::Context::getGeom(), and m_context.
Referenced by FWConvTrackHitsDetailView::addModules(), FWTrackHitsDetailView::addModules(), fireworks::addSiStripClusters(), FWCastorRecHitProxyBuilder::build(), FWCaloClusterProxyBuilder::build(), FWSiStripDigiProxyBuilder::build(), FWCSCRecHitProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWSiPixelClusterProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWTracksModulesProxyBuilder::build(), FWSiPixelClusterDetProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWCSCSegmentProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWPSimHitProxyBuilder::build(), FWCSCStripDigiProxyBuilder::build(), FWCSCWireDigiProxyBuilder::build(), FWSiPixelDigiProxyBuilder::build(), FWTrackingParticleProxyBuilder::build(), FWRPCDigiProxyBuilder::build(), FWSiStripClusterProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWTrackTrackingRecHitProxyBuilder::build(), FWDTSegmentProxyBuilder::build(), FWHORecHitProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), FWPhotonProxyBuilder::buildViewType(), FWDTDigiProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), FWHFTowerSliceSelector::findBinFromId(), fireworks::pushNearbyPixelHits(), fireworks::pushPixelHits(), FWEcalRecHitProxyBuilder::scaleProduct(), and FWHBHERecHitProxyBuilder::scaleProduct().
void FWEventItem::getPrimaryData | ( | ) | const [private] |
Definition at line 444 of file FWEventItem.cc.
References data(), m_accessor, and m_type.
Referenced by errorMessage(), handleChange(), modelData(), modelInfo(), modelInterestingValue(), modelInterestingValueAsString(), FWFileEntry::runFilter(), and size().
{ //if(0!=m_data) return; if(0!=m_accessor->data()) return; this->data(*(m_type->GetTypeInfo())); }
void FWEventItem::handleChange | ( | ) | [private] |
Definition at line 379 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), getPrimaryData(), preItemChanged_, and runFilter().
Referenced by moveToBack(), moveToFront(), moveToLayer(), setEvent(), and setLabels().
{ preItemChanged_(this); FWChangeSentry sentry(*(this->changeManager())); //want filter to rerun after all changes have been made changeManager()->changed(this); getPrimaryData(); runFilter(); }
bool FWEventItem::hasError | ( | void | ) | const |
returns true if failed to get data for this event
Definition at line 674 of file FWEventItem.cc.
References errorMessage().
Referenced by FWCollectionSummaryWidget::itemChanged().
{ return !errorMessage().empty(); }
bool FWEventItem::hasEvent | ( | ) | const [inline] |
bool FWEventItem::haveInterestingValue | ( | ) | const |
one value from the model which is normally used for the popup
Definition at line 588 of file FWEventItem.cc.
References FWItemValueGetter::isValid(), and m_interestingValueGetter.
Referenced by FWInteractionList::added(), and FWInteractionList::itemChanged().
{ return m_interestingValueGetter.isValid(); }
unsigned int FWEventItem::id | ( | void | ) | const |
Unique ID for the item. This number starts at 0 and increments by one for each new item.
Definition at line 495 of file FWEventItem.cc.
References m_id.
Referenced by FWModelChangeManager::changed(), destroy(), FWSelectionManager::itemChanged(), FWSummaryManager::itemDestroyed(), FWGUIManager::newItem(), FWModelChangeManager::newItemSlot(), FWEventItemsManager::removeItem(), runFilter(), FWSelectionManager::select(), select(), setDefaultDisplayProperties(), setDisplayProperties(), toggleSelect(), FWSelectionManager::unselect(), and unselect().
{ return m_id; }
bool FWEventItem::isCollection | ( | ) | const |
Definition at line 556 of file FWEventItem.cc.
References m_accessor.
{ return m_accessor->isCollection(); }
bool FWEventItem::isInBack | ( | ) | const |
returns true if item is behind all other items
Definition at line 479 of file FWEventItem.cc.
References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), layer(), and m_context.
Referenced by CmsShowEDI::updateLayerControls().
{ assert(0!=m_context->eventItemsManager()); for(FWEventItemsManager::const_iterator it = m_context->eventItemsManager()->begin(), itEnd = m_context->eventItemsManager()->end(); it != itEnd; ++it) { if((*it) && (*it != this) && (*it)->layer() <= layer()) { return false; } } return true; }
bool FWEventItem::isInFront | ( | ) | const |
returns true if item is in front of all other items
Definition at line 464 of file FWEventItem.cc.
References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), layer(), and m_context.
Referenced by CmsShowEDI::updateLayerControls().
{ assert(0!=m_context->eventItemsManager()); for(FWEventItemsManager::const_iterator it = m_context->eventItemsManager()->begin(), itEnd = m_context->eventItemsManager()->end(); it != itEnd; ++it) { if((*it) && (*it != this) && (*it)->layer() >= layer()) { return false; } } return true; }
bool FWEventItem::itemIsSelected | ( | ) | const |
Definition at line 668 of file FWEventItem.cc.
References m_isSelected.
Referenced by FWCollectionSummaryWidget::displayChanged(), FWCollectionSummaryWidget::infoClicked(), FWCollectionSummaryWidget::labelClicked(), FWCollectionSummaryWidget::setBackgroundToWhite(), and FWCollectionSummaryWidget::stateClicked().
{ return m_isSelected; }
int FWEventItem::layer | ( | ) | const |
objects with a larger layer number are drawn on top of objects with a lower number
Definition at line 458 of file FWEventItem.cc.
References m_layer.
Referenced by addElements(), isInBack(), isInFront(), FWProxyBuilderBase::itemChanged(), FWProxyBuilderBase::layer(), moveToBack(), moveToFront(), and CmsShowEDI::updateLayerControls().
{ return m_layer; }
int FWEventItem::maxLayerValue | ( | ) | [static] |
Definition at line 56 of file FWEventItem.cc.
Referenced by CmsShowEDI::CmsShowEDI(), moveToFront(), and moveToLayer().
{
return 100;
}
int FWEventItem::minLayerValue | ( | ) | [static] |
Definition at line 51 of file FWEventItem.cc.
Referenced by CmsShowEDI::CmsShowEDI(), moveToBack(), and moveToLayer().
{
return -100;
}
const void * FWEventItem::modelData | ( | int | iIndex | ) | const |
Definition at line 568 of file FWEventItem.cc.
References getPrimaryData(), and m_accessor.
Referenced by FWDetailViewBase::build(), FWSimpleProxyBuilder::build(), FWSimpleProxyBuilder::buildViewType(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWTableViewTableManager::rowHeader(), FWModelExpressionSelector::select(), and FWSimpleProxyBuilder::visibilityModelChanges().
{ getPrimaryData(); return m_accessor->modelData(iIndex); }
FWEventItem::ModelInfo FWEventItem::modelInfo | ( | int | iIndex | ) | const |
Definition at line 536 of file FWEventItem.cc.
References getPrimaryData(), FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and matplotRender::t.
Referenced by FWCastorRecHitProxyBuilder::build(), FWPFEcalClusterRPZProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWPFHcalClusterRPZProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWHBHERecHitProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWSimpleProxyBuilder::build(), FWHORecHitProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), FWSimpleProxyBuilder::buildViewType(), FWCollectionSummaryTableManager::buttonReleasedInRowHeader(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWFromSliceSelector::clear(), FWCollectionSummaryWidget::colorChangeRequested(), FWTableViewTableManager::dataChanged(), FWModelIdFromEveSelector::doSelect(), FWHFTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doUnselect(), FWModelIdFromEveSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWHFTowerProxyBuilderBase::fillCaloData(), FWCaloTowerProxyBuilderBase::fillCaloData(), CmsShowModelPopup::fillModelPopup(), FWProxyBuilderBase::increaseComponentTransparency(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), FWPFClusterLegoProxyBuilder::localModelChanges(), FWPFCandidatesLegoProxyBuilder::localModelChanges(), FWPFEcalRecHitLegoProxyBuilder::localModelChanges(), FWPFPatJetLegoProxyBuilder< T >::localModelChanges(), FWInteractionList::modelChanges(), FWDigitSetProxyBuilder::modelChanges(), FWTableViewTableManager::rowHeader(), FWCollectionSummaryModelCellRenderer::setData(), FWSecondarySelectableSelector::syncSelection(), and FWSimpleProxyBuilder::visibilityModelChanges().
{ getPrimaryData(); if(m_displayProperties.isVisible()) { return m_itemInfos.at(iIndex); } FWDisplayProperties dp(m_itemInfos.at(iIndex).displayProperties()); dp.setIsVisible(false); ModelInfo t(dp,m_itemInfos.at(iIndex).isSelected()); return t; }
double FWEventItem::modelInterestingValue | ( | int | iIndex | ) | const |
Definition at line 594 of file FWEventItem.cc.
References getPrimaryData(), m_accessor, m_interestingValueGetter, and FWItemValueGetter::valueFor().
{ getPrimaryData(); return m_interestingValueGetter.valueFor(m_accessor->modelData(iIndex)); }
const std::string & FWEventItem::modelInterestingValueAsString | ( | int | iIndex | ) | const |
Definition at line 601 of file FWEventItem.cc.
References getPrimaryData(), m_accessor, m_interestingValueGetter, and FWItemValueGetter::stringValueFor().
Referenced by FWInteractionList::added(), FWDigitSetProxyBuilder::getTooltip(), and FWInteractionList::itemChanged().
{ getPrimaryData(); return m_interestingValueGetter.stringValueFor(m_accessor->modelData(iIndex)); }
std::string FWEventItem::modelName | ( | int | iIndex | ) | const |
Definition at line 575 of file FWEventItem.cc.
References name(), and asciidump::s.
Referenced by FWInteractionList::added(), CmsShowModelPopup::fillModelPopup(), FWInteractionList::itemChanged(), FWCollectionSummaryWidget::itemColorClicked(), and FWCollectionSummaryModelCellRenderer::setData().
const TClass * FWEventItem::modelType | ( | ) | const |
Definition at line 562 of file FWEventItem.cc.
References m_accessor.
Referenced by FWDetailViewManager::detailViewsFor(), CmsShowEDI::fillEDIFrame(), FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), FWEventItem(), FWSimpleProxyHelper::itemChanged(), FWModelExpressionSelector::select(), FWTableView::selectCollection(), and FWTableViewTableManager::updateEvaluators().
{ return m_accessor->modelType(); }
const std::string & FWEventItem::moduleLabel | ( | ) | const |
Definition at line 519 of file FWEventItem.cc.
References m_moduleLabel.
Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().
{ return m_moduleLabel; }
void FWEventItem::moveToBack | ( | ) |
Definition at line 344 of file FWEventItem.cc.
References FWEventItemsManager::begin(), FWEventItemsManager::end(), fireworks::Context::eventItemsManager(), handleChange(), layer(), m_accessor, m_context, m_itemInfos, m_layer, max(), and minLayerValue().
Referenced by CmsShowEDI::moveToBack().
{ assert(0!=m_context->eventItemsManager()); int smallest = layer(); for(FWEventItemsManager::const_iterator it = m_context->eventItemsManager()->begin(), itEnd = m_context->eventItemsManager()->end(); it != itEnd; ++it) { if((*it) && (*it != this) && (*it)->layer() < smallest) { smallest= (*it)->layer(); } } if(smallest <= layer()) { m_layer = std::max(smallest-1, minLayerValue()); } m_itemInfos.clear(); m_accessor->reset(); handleChange(); }
void FWEventItem::moveToFront | ( | ) |
change layering
Definition at line 321 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().
{ assert(0!=m_context->eventItemsManager()); int largest = layer(); for(FWEventItemsManager::const_iterator it = m_context->eventItemsManager()->begin(), itEnd = m_context->eventItemsManager()->end(); it != itEnd; ++it) { if ((*it) && (*it != this) && (*it)->layer() > largest) { largest= (*it)->layer(); } } if(largest >= layer()) { m_layer = std::min(largest+1, maxLayerValue()); } m_itemInfos.clear(); m_accessor->reset(); handleChange(); }
void FWEventItem::moveToLayer | ( | int | layer | ) |
Definition at line 367 of file FWEventItem.cc.
References fireworks::Context::eventItemsManager(), handleChange(), m_accessor, m_context, m_itemInfos, m_layer, max(), maxLayerValue(), min, and minLayerValue().
Referenced by CmsShowEDI::moveToLayer().
{ assert(0!=m_context->eventItemsManager()); m_layer = std::max(std::min(layer, maxLayerValue()), minLayerValue()); m_itemInfos.clear(); m_accessor->reset(); handleChange(); }
const std::string & FWEventItem::name | ( | ) | const |
Definition at line 501 of file FWEventItem.cc.
References m_name.
Referenced by FWProxyBuilderBase::build(), FWCollectionSummaryWidget::colorClicked(), FWCollectionSummaryWidget::createColorPopup(), data(), CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWEventItemsManager::find(), FWCollectionSummaryWidget::FWCollectionSummaryWidget(), modelName(), FWGUIManager::newItem(), FWViewManagerManager::registerEventItem(), FWViewManagerManager::removeEventItem(), CmsShowEDI::removeItem(), runFilter(), and FWTableView::updateItems().
{ return m_name; }
const std::string & FWEventItem::processName | ( | ) | const |
Definition at line 530 of file FWEventItem.cc.
References m_processName.
Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().
{ return m_processName; }
const std::string & FWEventItem::productInstanceLabel | ( | ) | const |
Definition at line 524 of file FWEventItem.cc.
References m_productInstanceLabel.
Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().
{ return m_productInstanceLabel; }
const std::string & FWEventItem::purpose | ( | ) | const |
Since the same C++ type can be used for multiple purposes, this string disambiguates them.
Definition at line 513 of file FWEventItem.cc.
References m_purpose.
Referenced by FWProxyBuilderBase::canHandle(), FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), and FWEveViewManager::newItem().
{ return m_purpose; }
void FWEventItem::runFilter | ( | ) | [private] |
Definition at line 218 of file FWEventItem.cc.
References ExpressReco_HICollisions_FallBack::cerr, FWModelChangeManager::changed(), changeManager(), exception, id(), getHLTprescales::index, m_accessor, m_filter, m_itemInfos, name(), FWModelFilter::passesFilter(), and size().
Referenced by handleChange(), and setFilterExpression().
{ if(m_accessor->isCollection() && m_accessor->data()) { //std::cout <<"runFilter"<<std::endl; FWChangeSentry sentry(*(this->changeManager())); int size = m_accessor->size(); std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin(); try { for(int index = 0; index != size; ++index,++itInfo) { bool changed = false; bool wasVisible = itInfo->m_displayProperties.isVisible(); if(not m_filter.passesFilter(m_accessor->modelData(index))) { itInfo->m_displayProperties.setIsVisible(false); changed = wasVisible==true; } else { itInfo->m_displayProperties.setIsVisible(true); changed = wasVisible==false; } if(changed) { FWModelId id(this,index); changeManager()->changed(id); } } } catch( const std::exception& iException) { //Should log this error std::cerr <<"Exception occurred while running filter on "<<name()<<"\n" <<iException.what()<<std::endl; } } }
void FWEventItem::select | ( | int | iIndex | ) | const |
Definition at line 261 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, runTheMatrix::sel, FWSelectionManager::select(), selectionManager(), and selectItem().
Referenced by FWHFTowerSliceSelector::doSelect(), FWCaloTowerSliceSelector::doSelect(), FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), FWModelId::select(), FWModelExpressionSelector::select(), CmsShowEDI::selectAll(), and FWSecondarySelectableSelector::syncSelection().
{ bool& sel = m_itemInfos.at(iIndex).m_isSelected; if(not sel) { sel = true; FWModelId id(this,iIndex); selectionManager()->select(id); //want to make it obvious what type of object was selected // therefore we also select the item const_cast<FWEventItem*>(this)->selectItem(); changeManager()->changed(id); } }
FWSelectionManager* FWEventItem::selectionManager | ( | ) | const [inline] |
Definition at line 133 of file FWEventItem.h.
References m_context, and fireworks::Context::selectionManager().
Referenced by destroy(), FWCollectionSummaryWidget::infoClicked(), FWCollectionSummaryWidget::labelClicked(), FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), CmsShowEDI::runSelection(), select(), selectItem(), FWCollectionSummaryWidget::stateClicked(), toggleSelect(), toggleSelectItem(), unselect(), and unselectItem().
{ return m_context->selectionManager(); }
void FWEventItem::selectItem | ( | ) |
Select the item (i.e. container) itself
Definition at line 639 of file FWEventItem.cc.
References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), and FWSelectionManager::selectItem().
Referenced by FWCollectionSummaryWidget::infoClicked(), FWCollectionSummaryWidget::labelClicked(), select(), and FWCollectionSummaryWidget::stateClicked().
{ if(!m_isSelected) { m_isSelected=true; selectionManager()->selectItem(this); defaultDisplayPropertiesChanged_(this); } }
void FWEventItem::setData | ( | const Reflex::Object & | iData | ) | const [private] |
Definition at line 431 of file FWEventItem.cc.
References m_accessor, m_displayProperties, and m_itemInfos.
Referenced by data().
{ m_accessor->setData(iData); //std::cout <<"size "<<m_accessor->size()<<std::endl; if(m_accessor->isCollection()) { m_itemInfos.reserve(m_accessor->size()); m_itemInfos.resize(m_accessor->size(),ModelInfo(m_displayProperties,false)); } else { m_itemInfos.push_back(ModelInfo(m_displayProperties,false)); } }
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 166 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), FWDisplayProperties::color(), defaultDisplayPropertiesChanged_, id(), getHLTprescales::index, FWDisplayProperties::isVisible(), m_displayProperties, m_itemInfos, prp, FWDisplayProperties::setColor(), FWDisplayProperties::setTransparency(), size(), and FWDisplayProperties::transparency().
Referenced by CmsShowEDI::changeItemColor(), CmsShowEDI::changeItemOpacity(), FWCollectionSummaryWidget::colorChangeRequested(), CmsShowEDI::toggleItemVisible(), and FWCollectionSummaryWidget::toggleItemVisible().
{ bool visChange = m_displayProperties.isVisible() != iProp.isVisible(); bool colorChanged = m_displayProperties.color() != iProp.color(); bool transparencyChanged = m_displayProperties.transparency() != iProp.transparency(); if(!visChange && !colorChanged && !transparencyChanged) { return; } //If the default visibility is changed, we want to also change the the visibility of the children // BUT we want to remember the old visibility so if the visibility is changed again we return // to the previous state. // only the visible ones need to be marked as 'changed' FWChangeSentry sentry(*(changeManager())); for(int index=0; index <static_cast<int>(size()); ++index) { FWDisplayProperties prp = m_itemInfos[index].displayProperties(); bool vis=prp.isVisible(); bool changed = false; changed = visChange && vis; if(colorChanged) { if(m_displayProperties.color()==prp.color()) { prp.setColor(iProp.color()); changed = true; } } if (transparencyChanged) { if(m_displayProperties.transparency() == prp.transparency()) { prp.setTransparency(iProp.transparency()); changed = true; } } if(changed) { m_itemInfos[index].m_displayProperties=prp; FWModelId id(this,index); changeManager()->changed(id); } } m_displayProperties= iProp; defaultDisplayPropertiesChanged_(this); }
void FWEventItem::setDisplayProperties | ( | int | iIndex, |
const FWDisplayProperties & | iProps | ||
) | const |
Definition at line 287 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), defaultDisplayPropertiesChanged_, id(), getHLTprescales::index, FWDisplayProperties::isVisible(), m_accessor, m_displayProperties, m_itemInfos, FWDisplayProperties::setIsVisible(), and size().
Referenced by FWCollectionSummaryTableManager::buttonReleasedInRowHeader(), and FWCollectionSummaryWidget::colorChangeRequested().
{ FWDisplayProperties& prop = m_itemInfos.at(iIndex).m_displayProperties; if(m_displayProperties.isVisible()) { if( prop != iProps ) { prop = iProps; FWModelId id(this,iIndex); //selectionManager()->select(id); changeManager()->changed(id); } } else { if(iProps.isVisible()) { FWChangeSentry sentry(*(this->changeManager())); int size = m_accessor->size(); std::vector<ModelInfo>::iterator itInfo = m_itemInfos.begin(); for(int index = 0; index != size; ++index,++itInfo) { if( itInfo->m_displayProperties.isVisible() ) { itInfo->m_displayProperties.setIsVisible(false); FWModelId id(this,index); changeManager()->changed(id); } } m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(true); FWModelId id(this,iIndex); changeManager()->changed(id); const_cast<FWEventItem*>(this)->m_displayProperties.setIsVisible(true); //NOTE: need to send out a signal here defaultDisplayPropertiesChanged_(this); } } }
void FWEventItem::setEvent | ( | const edm::EventBase * | iEvent | ) |
Definition at line 131 of file FWEventItem.cc.
References handleChange(), iEvent, m_accessor, m_event, m_itemInfos, and m_printedErrorThisEvent.
Referenced by FWEventItemsManager::newEvent().
{ m_printedErrorThisEvent = false; m_event = iEvent; m_accessor->reset(); m_itemInfos.clear(); handleChange(); }
void FWEventItem::setFilterExpression | ( | const std::string & | iExpression | ) |
Throws an FWExpresionException if there is a problem with the expression
Definition at line 210 of file FWEventItem.cc.
References filterChanged_, m_filter, runFilter(), and FWModelFilter::setExpression().
Referenced by CmsShowEDI::runFilter().
{ m_filter.setExpression(iExpression); filterChanged_(this); runFilter(); }
void FWEventItem::setLabels | ( | const std::string & | iModule, |
const std::string & | iProductInstance, | ||
const std::string & | iProcess | ||
) |
Definition at line 141 of file FWEventItem.cc.
References handleChange(), m_accessor, m_itemInfos, m_moduleLabel, m_processName, and m_productInstanceLabel.
{ m_moduleLabel = iModule; m_productInstanceLabel = iProductInstance; m_processName = iProcess; m_accessor->reset(); m_itemInfos.clear(); handleChange(); }
void FWEventItem::setName | ( | const std::string & | iName | ) |
size_t FWEventItem::size | ( | void | ) | const |
Definition at line 549 of file FWEventItem.cc.
References getPrimaryData(), and m_itemInfos.
Referenced by FWPFEcalRecHitLegoProxyBuilder::build(), FWProxyBuilderBase::build(), FWSimpleProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWSimpleProxyBuilder::buildViewType(), FWCollectionSummaryTableManager::cellRenderer(), FWTableViewTableManager::cellRenderer(), FWFromSliceSelector::clear(), FWTableViewTableManager::dataChanged(), FWCollectionSummaryTableManager::dataChanged(), destroy(), FWInteractionList::itemChanged(), FWProxyBuilderBase::modelChanges(), FWInteractionList::modelChanges(), FWTableViewTableManager::numberOfRows(), FWCollectionSummaryTableManager::numberOfRows(), FWJetProxyBuilder::requestCommon(), FWElectronProxyBuilder::requestCommon(), FWConversionProxyBuilder::requestCommon(), FWTableViewTableManager::rowHeader(), FWCollectionSummaryTableManager::rowHeader(), runFilter(), FWModelExpressionSelector::select(), CmsShowEDI::selectAll(), setDefaultDisplayProperties(), setDisplayProperties(), and FWSecondarySelectableSelector::syncSelection().
{ getPrimaryData(); return m_itemInfos.size(); }
void FWEventItem::toggleSelect | ( | int | iIndex | ) | const |
Definition at line 275 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, runTheMatrix::sel, FWSelectionManager::select(), selectionManager(), and FWSelectionManager::unselect().
Referenced by FWTableView::modelSelected(), FWCollectionSummaryWidget::modelSelected(), and FWModelId::toggleSelect().
{ bool& sel = m_itemInfos.at(iIndex).m_isSelected; sel = not sel; FWModelId id(this,iIndex); if (sel) selectionManager()->select(id); else selectionManager()->unselect(id); changeManager()->changed(id); }
void FWEventItem::toggleSelectItem | ( | ) |
Definition at line 657 of file FWEventItem.cc.
References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), FWSelectionManager::selectItem(), and FWSelectionManager::unselectItem().
{ m_isSelected = !m_isSelected; if(m_isSelected) { selectionManager()->selectItem(this); }else { selectionManager()->unselectItem(this); } defaultDisplayPropertiesChanged_(this); }
const TClass * FWEventItem::type | ( | ) | const |
Definition at line 507 of file FWEventItem.cc.
References m_type.
Referenced by CmsShowEDI::fillEDIFrame(), and FWFileEntry::runFilter().
{ return m_type; }
void FWEventItem::unselect | ( | int | iIndex | ) | const |
Definition at line 250 of file FWEventItem.cc.
References FWModelChangeManager::changed(), changeManager(), id(), m_itemInfos, runTheMatrix::sel, selectionManager(), and FWSelectionManager::unselect().
Referenced by FWFromSliceSelector::clear(), FWCaloTowerSliceSelector::doUnselect(), FWHFTowerSliceSelector::doUnselect(), FWSecondarySelectableSelector::syncSelection(), and FWModelId::unselect().
{ //check if this is a change if(bool& sel = m_itemInfos.at(iIndex).m_isSelected) { sel=false; FWModelId id(this,iIndex); selectionManager()->unselect(id); changeManager()->changed(id); } }
void FWEventItem::unselectItem | ( | ) |
Definition at line 648 of file FWEventItem.cc.
References defaultDisplayPropertiesChanged_, m_isSelected, selectionManager(), and FWSelectionManager::unselectItem().
Referenced by destroy().
{ if(m_isSelected) { m_isSelected=false; selectionManager()->unselectItem(this); defaultDisplayPropertiesChanged_(this); } }
FWModelChangeSignal FWEventItem::changed_ [mutable] |
connect to this signal if you want to know when models held by the item change
Definition at line 192 of file FWEventItem.h.
Referenced by CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), FWEveViewManager::newItem(), and FWModelChangeManager::newItemSlot().
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 204 of file FWEventItem.h.
Referenced by CmsShowEDI::fillEDIFrame(), FWCollectionSummaryWidget::FWCollectionSummaryWidget(), selectItem(), setDefaultDisplayProperties(), setDisplayProperties(), toggleSelectItem(), and unselectItem().
connect to this signal if you want to know that the filter being applied to the item was changed.
Definition at line 207 of file FWEventItem.h.
Referenced by FWCollectionSummaryWidget::FWCollectionSummaryWidget(), and setFilterExpression().
connect to this signal if you need to know that this item is going to be destroyed.
Definition at line 211 of file FWEventItem.h.
Referenced by destroy(), CmsShowEDI::fillEDIFrame(), CmsShowModelPopup::fillModelPopup(), FWEveViewManager::newItem(), FWTableViewManager::newItem(), FWSummaryManager::newItem(), and FWViewManagerManager::registerEventItem().
FWItemChangeSignal FWEventItem::itemChanged_ [mutable] |
connect to this signal if you want to know when the data underlying the item changes
Definition at line 195 of file FWEventItem.h.
Referenced by FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), FWCollectionSummaryWidget::FWCollectionSummaryWidget(), FWEveViewManager::newItem(), FWSummaryManager::newItem(), and FWModelChangeManager::newItemSlot().
boost::shared_ptr<FWItemAccessorBase> FWEventItem::m_accessor [private] |
Definition at line 227 of file FWEventItem.h.
Referenced by data(), FWEventItem(), getPrimaryData(), isCollection(), modelData(), modelInterestingValue(), modelInterestingValueAsString(), modelType(), moveToBack(), moveToFront(), moveToLayer(), runFilter(), setData(), setDisplayProperties(), setEvent(), and setLabels().
const fireworks::Context* FWEventItem::m_context [private] |
Definition at line 222 of file FWEventItem.h.
Referenced by changeManager(), colorManager(), context(), getGeom(), isInBack(), isInFront(), moveToBack(), moveToFront(), moveToLayer(), and selectionManager().
Definition at line 228 of file FWEventItem.h.
Referenced by defaultDisplayProperties(), modelInfo(), setData(), setDefaultDisplayProperties(), and setDisplayProperties().
std::string FWEventItem::m_errorMessage [mutable, private] |
Definition at line 242 of file FWEventItem.h.
Referenced by data(), and errorMessage().
const edm::EventBase* FWEventItem::m_event [private] |
Definition at line 236 of file FWEventItem.h.
Referenced by data(), getEvent(), hasEvent(), FWFileEntry::runFilter(), and setEvent().
FWModelFilter FWEventItem::m_filter [private] |
Definition at line 240 of file FWEventItem.h.
Referenced by filterExpression(), FWEventItem(), runFilter(), and setFilterExpression().
unsigned int FWEventItem::m_id [private] |
Definition at line 223 of file FWEventItem.h.
Referenced by id().
Definition at line 238 of file FWEventItem.h.
Referenced by haveInterestingValue(), modelInterestingValue(), and modelInterestingValueAsString().
bool FWEventItem::m_isSelected [private] |
Definition at line 244 of file FWEventItem.h.
Referenced by itemIsSelected(), selectItem(), toggleSelectItem(), and unselectItem().
std::vector<ModelInfo> FWEventItem::m_itemInfos [mutable, private] |
Definition at line 230 of file FWEventItem.h.
Referenced by destroy(), FWEventItem(), modelInfo(), moveToBack(), moveToFront(), moveToLayer(), runFilter(), select(), setData(), setDefaultDisplayProperties(), setDisplayProperties(), setEvent(), setLabels(), size(), toggleSelect(), and unselect().
int FWEventItem::m_layer [private] |
Definition at line 229 of file FWEventItem.h.
Referenced by layer(), moveToBack(), moveToFront(), and moveToLayer().
std::string FWEventItem::m_moduleLabel [private] |
Definition at line 233 of file FWEventItem.h.
Referenced by data(), moduleLabel(), and setLabels().
std::string FWEventItem::m_name [private] |
Definition at line 224 of file FWEventItem.h.
bool FWEventItem::m_printedErrorThisEvent [mutable, private] |
Definition at line 241 of file FWEventItem.h.
Referenced by data(), and setEvent().
std::string FWEventItem::m_processName [private] |
Definition at line 235 of file FWEventItem.h.
Referenced by data(), processName(), and setLabels().
std::string FWEventItem::m_productInstanceLabel [private] |
Definition at line 234 of file FWEventItem.h.
Referenced by data(), productInstanceLabel(), and setLabels().
std::string FWEventItem::m_purpose [private] |
Definition at line 226 of file FWEventItem.h.
Referenced by purpose().
const TClass* FWEventItem::m_type [private] |
Definition at line 225 of file FWEventItem.h.
Referenced by data(), getPrimaryData(), and type().
ROOT::Reflex::Type FWEventItem::m_wrapperType [private] |
Definition at line 237 of file FWEventItem.h.
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 200 of file FWEventItem.h.
Referenced by handleChange(), and FWSelectionManager::select().