|
|
Go to the documentation of this file.
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)
static const std::string kType("type")
FWEventItem * add(const FWPhysicsObjectDesc &iItem, const FWConfiguration *pbConf=nullptr, bool doSetEvent=true)
void newEvent(const edm::EventBase *iEvent)
FWColorManager * colorManager() const
void addTo(FWConfiguration &) const override
fireworks::Context * m_context
static const std::string kTransparency("transparency")
std::vector< FWEventItem * > m_items
U second(std::pair< T, U > const &p)
sigc::signal< void > goingToClearItems_
FWEventItemsManager(FWModelChangeManager *)
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
static const std::string kFalse("f")
static const std::string kProductInstanceLabel("productInstanceLabel")
std::shared_ptr< FWItemAccessorFactory > m_accessorFactory
static const std::string kIsVisible("isVisible")
static const std::string kPurpose("purpose")
const FWConfiguration * valueForKey(const std::string &iKey) const
void setFrom(const FWConfiguration &) override
const_iterator end() const
void removeItem(const FWEventItem *)
const FWEventItem * find(const std::string &iName) const
std::vector< FWEventItem * >::const_iterator const_iterator
static Color_t getDefaultStartColorIndex()
unsigned int version() const
Color_t oldColorToIndex(Color_t, int version) const
FWModelChangeManager * m_changeManager
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
static const std::string kModuleLabel("moduleLabel")
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
void setContext(fireworks::Context *)
static const std::string kTrue("t")
static const std::string kProcessName("processName")
const KeyValues * keyValues() const
bool colorHasIndex(Color_t) const
sigc::signal< void, FWEventItem * > newItem_
static const std::string kColor("color")
const edm::EventBase * m_event
~FWEventItemsManager() override
static const std::string kLayer("layer")
static const std::string kFilterExpression("filterExpression")
sigc::signal< void, const FWEventItem * > removingItem_