12 #include <boost/algorithm/string.hpp> 14 #include "KeySymbols.h" 30 std::stringstream
str(value);
33 bool fail = str.fail();
61 if (boost::iequals(value,
"true")) {
64 else if (boost::iequals(value,
"false")){
68 fwLog(
fwlog::kError) <<
"Invalid value. Possible values are true/false case insensitive." << std::endl;
95 std::stringstream iss(value);
100 while (getline(iss, vitem,
','))
102 fst = vitem.find(
"[");
103 lst = vitem.find(
"]");
105 if ( fst != std::string::npos )
107 if ( lst != std::string::npos )
111 size_t nwords = tokens.size();
125 it_label = tokens[0];
127 it_instance = tokens[1];
129 it_process = tokens[2];
131 inputTags.push_back(
edm::InputTag(it_label, it_instance, it_process));
150 size_t nwords = tokens.size();
165 it_label = tokens[0];
167 it_instance = tokens[1];
169 it_process = tokens[2];
189 size_t nwords = tokens.size();
203 it_module = tokens[0];
219 template <
typename T>
226 std::stringstream iss(value);
231 while (getline(iss, vitem,
','))
233 fst = vitem.find(
"[");
234 lst = vitem.find(
"]");
236 if ( fst != std::string::npos )
238 if ( lst != std::string::npos )
241 std::stringstream oss(vitem);
245 valueVector.push_back(on);
261 editNumericParameter<int32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
267 editNumericParameter<uint32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
270 editNumericParameter<double>(*parent.
pset, data.
tracked, data.
label, GetText());
273 editNumericParameter<long long>(*parent.
pset, data.
tracked, data.
label, GetText());
276 editNumericParameter<unsigned long long>(*parent.
pset, data.
tracked, data.
label, GetText());
282 editVectorParameter<int32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
285 editVectorParameter<uint32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
288 editVectorParameter<long long>(*parent.
pset, data.
tracked, data.
label, GetText());
291 editVectorParameter<unsigned long long>(*parent.
pset, data.
tracked, data.
label, GetText());
294 editVectorParameter<double>(*parent.
pset, data.
tracked, data.
label, GetText());
297 editVectorParameter<std::string>(*parent.
pset, data.
tracked, data.
label, GetText());
323 UInt_t keysym =
event->fCode;
325 if (keysym == (UInt_t) gVirtualX->KeysymToKeycode(kKey_Escape))
327 TGFrame *
p =
dynamic_cast<TGFrame*
>(
const_cast<TGWindow*
>(GetParent()));
330 TGMainFrame *mp =
dynamic_cast<TGMainFrame*
>(
p);
334 return mp->HandleKey(event);
336 p =
dynamic_cast<TGFrame*
>(
const_cast<TGWindow*
>(p->GetParent()));
340 return TGTextEntry::HandleKey(event);
bool editESInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
void editVectorParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
void valueVector(const std::map< K, V > &extract, std::vector< V > &output)
void editStringParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
bool editVInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
void addParameter(std::string const &name, T const &value)
bool apply(FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
void editBoolParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
void addUntrackedParameter(std::string const &name, T const &value)
bool editNumericParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
char data[epos_bytes_allocation]
void editFileInPath(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
bool HandleKey(Event_t *event) override
bool editInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
std::vector< std::string > tokenize(std::string const &input, std::string const &separator)
breaks the input string into tokens, delimited by the separator