15 #include <boost/bind.hpp> 42 m_changeManager(iManager),
164 for(std::vector<FWEventItem*>::const_iterator it =
m_items.begin();
179 std::ostringstream os;
180 os << (*it)->defaultDisplayProperties().color();
185 std::ostringstream os;
186 os << (*it)->layer();
191 std::ostringstream os;
192 os << static_cast<int>((*it)->defaultDisplayProperties().transparency());
197 (*it)->getConfig()->addTo(pbTmp);
215 if (keyValues == 0)
return;
217 std::vector<FWEventItem*> newItems;
218 newItems.reserve(keyValues->size());
220 for (FWConfiguration::KeyValues::const_iterator it = keyValues->begin();
221 it != keyValues->end();
227 assert(0!=keyValues);
229 const std::string& moduleLabel = (*keyValues)[1].second.value();
230 const std::string& productInstanceLabel = (*keyValues)[2].second.value();
232 const std::string& filterExpression = (*keyValues)[4].second.value();
233 const std::string& sColor = (*keyValues)[5].second.value();
234 const bool isVisible = (*keyValues)[6].second.value() ==
kTrue;
236 unsigned int colorIndex;
239 std::istringstream is(sColor);
250 std::istringstream is(sColor);
254 int transparency = 0;
259 transparency = strtol((*keyValues)[9].second.value().c_str(), 0, 10);
263 unsigned int layer = strtol((*keyValues)[7].
second.value().c_str(), 0, 10);
268 purpose = (*keyValues)[8].second.value();
275 assert(proxyConfig == 0);
276 if (purpose ==
"VerticesWithTracks")
278 purpose =
"Vertices";
286 TClass::GetClass(type.c_str()),
290 productInstanceLabel,
295 newItems.push_back(
add(desc, proxyConfig,
false) );
301 for (
auto ip : newItems)
352 if (item && item->
name() == iName)
FWModelChangeManager * m_changeManager
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
const KeyValues * keyValues() const
void removeItem(const FWEventItem *)
const FWDisplayProperties & displayProperties() const
static const std::string kModuleLabel("moduleLabel")
void setEvent(const edm::EventBase *iEvent)
const std::string & name() const
void setFrom(const FWConfiguration &)
FWColorManager * colorManager() const
static const std::string kTrue("t")
static Color_t getDefaultStartColorIndex()
unsigned int version() const
Color_t oldColorToIndex(Color_t, int version) const
static const std::string kType("type")
void setContext(fireworks::Context *)
const TClass * type() const
sigc::signal< void, const FWEventItem * > removingItem_
FWEventItem * add(const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=0, bool doSetEvent=true)
bool colorHasIndex(Color_t) const
static const std::string kColor("color")
static const std::string kProductInstanceLabel("productInstanceLabel")
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")
void setDisplayProperties(const FWDisplayProperties &)
sigc::signal< void, FWEventItem * > newItem_
const FWEventItem * find(const std::string &iName) const
static const std::string kLayer("layer")
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
const edm::EventBase * m_event
std::shared_ptr< FWItemAccessorFactory > m_accessorFactory
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
static const std::string kTransparency("transparency")
void newEvent(const edm::EventBase *iEvent)
static const std::string kIsVisible("isVisible")
static const std::string kPurpose("purpose")
virtual ~FWEventItemsManager()
fireworks::Context * m_context
const FWConfiguration * valueForKey(const std::string &iKey) const
std::vector< FWEventItem * > m_items
void addTo(FWConfiguration &) const
std::vector< FWEventItem * >::const_iterator const_iterator
sigc::signal< void > goingToClearItems_
FWEventItemsManager(FWModelChangeManager *)
const_iterator end() const