47 std::shared_ptr<FWItemAccessorBase> iAccessor,
50 : m_context(iContext),
55 m_accessor(iAccessor),
56 m_displayProperties(iDesc.displayProperties()),
57 m_layer(iDesc.
layer()),
59 m_productInstanceLabel(iDesc.productInstanceLabel()),
62 m_interestingValueGetter(
edm::TypeWithDict(*(m_accessor->modelType()->GetTypeInfo())), m_purpose),
63 m_filter(iDesc.filterExpression(),
""),
64 m_printedErrorThisEvent(
false),
67 m_proxyBuilderConfig(nullptr) {
143 if (!visChange && !colorChanged && !transparencyChanged) {
155 bool changed =
false;
156 changed = visChange &&
vis;
164 if (transparencyChanged) {
191 std::vector<ModelInfo>::iterator itInfo =
m_itemInfos.begin();
194 bool changed =
false;
195 bool wasVisible = itInfo->m_displayProperties.isVisible();
197 itInfo->m_displayProperties.setIsVisible(
false);
198 changed = wasVisible ==
true;
200 itInfo->m_displayProperties.setIsVisible(
true);
201 changed = wasVisible ==
false;
210 std::cerr <<
"Exception occurred while running filter on " <<
name() <<
"\n" << iException.what() << std::endl;
250 if (prop != iProps) {
260 std::vector<ModelInfo>::iterator itInfo =
m_itemInfos.begin();
262 if (itInfo->m_displayProperties.isVisible()) {
263 itInfo->m_displayProperties.setIsVisible(
false);
268 m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(
true);
280 int largest =
layer();
285 if ((*it) && (*it !=
this) && (*it)->layer() > largest) {
286 largest = (*it)->layer();
290 if (largest >=
layer()) {
301 int smallest =
layer();
306 if ((*it) && (*it !=
this) && (*it)->layer() < smallest) {
307 smallest = (*it)->layer();
311 if (smallest <=
layer()) {
374 std::ostringstream
s;
375 s <<
"Failed to get " <<
name() <<
" because \n" << iException.what();
413 if ((*it) && (*it !=
this) && (*it)->layer() >=
layer()) {
426 if ((*it) && (*it !=
this) && (*it)->layer() <=
layer()) {
452 dp.setIsVisible(
false);
472 std::ostringstream
s;
473 size_t lastChar =
name().size();
475 if (
name()[lastChar - 1] ==
's') {
478 s <<
name().substr(0, lastChar) <<
" " << iIndex;
bool isCollection() const
void proxyConfigChanged(bool k=false)
FWItemChangeSignal preItemChanged_
const std::string & expression() const
const void * modelData(int iIndex) const
void setColor(Color_t iColor)
void select(const FWModelId &iId)
void setData(const edm::ObjectWithDict &) const
void moveToLayer(int layer)
const FWEventItemsManager * eventItemsManager() const
void setEvent(const edm::EventBase *iEvent)
bool itemIsSelected() const
FWItemValueGetter m_interestingValueGetter
Char_t transparency() const
FWItemChangeSignal defaultDisplayPropertiesChanged_
bool isInBack() const
returns true if item is behind all other items
bool passesFilter(const void *) const
FWItemChangeSignal goingToBeDestroyed_
FWModelChangeManager * changeManager() const
const std::string & processName() const
const std::string & errorMessage() const
returns error string if there was a problem this event
bool getByLabel(InputTag const &, Handle< T > &) const
const fireworks::Context * m_context
bool isInFront() const
returns true if item is in front of all other items
const std::string & moduleLabel() const
void setLabels(const std::string &iModule, const std::string &iProductInstance, const std::string &iProcess)
std::string m_moduleLabel
std::shared_ptr< FWItemAccessorBase > m_accessor
const void * data(const std::type_info &) const
static int maxLayerValue()
const std::string & modelInterestingValueAsString(int iIndex) const
void select(int iIndex) const
constexpr std::array< uint8_t, layerIndexSize > layer
FWSelectionManager * selectionManager() const
const TClass * modelType() const
void unselect(int iIndex) const
void setDefaultDisplayProperties(const FWDisplayProperties &)
const FWDisplayProperties & displayProperties() const
FWGeometry * getGeom() const
std::string modelName(int iIndex) const
std::string m_processName
void getPrimaryData() const
const FWDisplayProperties & defaultDisplayProperties() const
void setClassName(const std::string &)
FWProxyBuilderConfiguration * m_proxyBuilderConfig
bool hasError() const
returns true if failed to get data for this event
const std::string & filterExpression() const
void unselectItem(FWEventItem *)
void unselect(const FWModelId &iId)
static int minLayerValue()
bool m_printedErrorThisEvent
const std::string & getToolTip(const void *iObject) const
void changed(const FWModelId &)
const FWGeometry * getGeom() const
void setExpression(const std::string &)
FWDisplayProperties m_displayProperties
const TClass * type() const
const std::string & name() const
void setFilterExpression(const std::string &)
void setTransparency(Char_t transparency)
const edm::EventBase * m_event
FWEventItem(fireworks::Context *iContext, unsigned int iItemId, std::shared_ptr< FWItemAccessorBase > iAccessor, const FWPhysicsObjectDesc &iDesc, const FWConfiguration *pbConf=nullptr)
std::string m_errorMessage
std::vector< ModelInfo > m_itemInfos
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
bool haveInterestingValue() const
const std::string & purpose() const
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
const_iterator end() const
void setIsVisible(bool iSet)
ModelInfo modelInfo(int iIndex) const
const std::string & productInstanceLabel() const
void setName(const std::string &iName)
std::vector< FWEventItem * >::const_iterator const_iterator
std::string m_productInstanceLabel
void toggleSelect(int iIndex) const
void selectItem(FWEventItem *)
FWItemChangeSignal filterChanged_