42 : m_changeManager(iManager), m_context(nullptr), m_event(nullptr), m_accessorFactory(new
FWItemAccessorFactory()) {}
83 "FWEventItemsManager::add(const FWPhysicsObjectDesc& iItem), color index not valid. Set Color idex to %d\n",
86 temp.setDisplayProperties(prop);
146 for (std::vector<FWEventItem*>::const_iterator it =
m_items.begin(); it !=
m_items.end(); ++it) {
159 std::ostringstream os;
160 os << (*it)->defaultDisplayProperties().color();
165 std::ostringstream os;
166 os << (*it)->layer();
171 std::ostringstream os;
172 os << static_cast<int>((*it)->defaultDisplayProperties().transparency());
177 (*it)->getConfig()->addTo(pbTmp);
193 if (keyValues ==
nullptr)
196 std::vector<FWEventItem*> newItems;
197 newItems.reserve(keyValues->size());
199 for (FWConfiguration::KeyValues::const_iterator it = keyValues->begin(); it != keyValues->end(); ++it) {
203 assert(
nullptr != keyValues);
206 const std::string& productInstanceLabel = (*keyValues)[2].second.value();
208 const std::string& filterExpression = (*keyValues)[4].second.value();
209 const std::string& sColor = (*keyValues)[5].second.value();
210 const bool isVisible = (*keyValues)[6].second.value() ==
kTrue;
212 unsigned int colorIndex;
214 std::istringstream is(sColor);
223 std::istringstream is(sColor);
227 int transparency = 0;
232 transparency = strtol((*keyValues)[9].second.value().c_str(),
nullptr, 10);
236 unsigned int layer = strtol((*keyValues)[7].
second.value().c_str(),
nullptr, 10);
241 purpose = (*keyValues)[8].second.value();
248 assert(proxyConfig ==
nullptr);
249 if (
purpose ==
"VerticesWithTracks") {
259 TClass::GetClass(
type.c_str()),
263 productInstanceLabel,
268 newItems.push_back(
add(
desc, proxyConfig,
false));
273 for (
auto ip : newItems)
FWModelChangeManager * m_changeManager
void removeItem(const FWEventItem *)
static const std::string kModuleLabel("moduleLabel")
sigc::signal< void(FWEventItem *)> newItem_
static const std::string kTrue("t")
void setFrom(const FWConfiguration &) override
static Color_t getDefaultStartColorIndex()
bool colorHasIndex(Color_t) const
static const std::string kType("type")
void setContext(fireworks::Context *)
const FWEventItem * find(const std::string &iName) const
static const std::string kColor("color")
static const std::string kProductInstanceLabel("productInstanceLabel")
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
U second(std::pair< T, U > const &p)
static const std::string kFilterExpression("filterExpression")
static const std::string kProcessName("processName")
static const std::string kFalse("f")
~FWEventItemsManager() override
FWEventItem * add(const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=nullptr, bool doSetEvent=true)
static const std::string kLayer("layer")
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
const edm::EventBase * m_event
std::shared_ptr< FWItemAccessorFactory > m_accessorFactory
static const std::string kTransparency("transparency")
const FWConfiguration * valueForKey(const std::string &iKey) const
sigc::signal< void(const FWEventItem *)> removingItem_
void newEvent(const edm::EventBase *iEvent)
void addTo(FWConfiguration &) const override
static const std::string kIsVisible("isVisible")
static const std::string kPurpose("purpose")
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
fireworks::Context * m_context
std::vector< FWEventItem * > m_items
const_iterator end() const
const KeyValues * keyValues() const
std::vector< FWEventItem * >::const_iterator const_iterator
Color_t oldColorToIndex(Color_t, int version) const
sigc::signal< void()> goingToClearItems_
FWColorManager * colorManager() const
FWEventItemsManager(FWModelChangeManager *)
unsigned int version() const