12 #include <boost/algorithm/string.hpp>
14 #include "KeySymbols.h"
27 std::stringstream
str(value);
30 bool fail = str.fail();
52 if (boost::iequals(value,
"true")) {
54 }
else if (boost::iequals(value,
"false")) {
57 fwLog(
fwlog::kError) <<
"Invalid value. Possible values are true/false case insensitive." << std::endl;
77 std::vector<edm::InputTag> inputTags;
78 std::stringstream iss(value);
83 while (getline(iss, vitem,
',')) {
84 fst = vitem.find(
'[');
85 lst = vitem.find(
']');
87 if (fst != std::string::npos)
89 if (lst != std::string::npos)
93 size_t nwords = tokens.size();
104 it_label = tokens[0];
106 it_instance = tokens[1];
108 it_process = tokens[2];
110 inputTags.push_back(
edm::InputTag(it_label, it_instance, it_process));
126 size_t nwords = tokens.size();
138 it_label = tokens[0];
140 it_instance = tokens[1];
142 it_process = tokens[2];
159 size_t nwords = tokens.size();
170 it_module = tokens[0];
186 template <
typename T>
188 std::vector<T> valueVector;
190 std::stringstream iss(value);
195 while (getline(iss, vitem,
',')) {
196 fst = vitem.find(
'[');
197 lst = vitem.find(
']');
199 if (fst != std::string::npos)
201 if (lst != std::string::npos)
204 std::stringstream oss(vitem);
208 valueVector.push_back(on);
222 editNumericParameter<int32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
228 editNumericParameter<uint32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
231 editNumericParameter<double>(*parent.
pset, data.
tracked, data.
label, GetText());
234 editNumericParameter<long long>(*parent.
pset, data.
tracked, data.
label, GetText());
237 editNumericParameter<unsigned long long>(*parent.
pset, data.
tracked, data.
label, GetText());
243 editVectorParameter<int32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
246 editVectorParameter<uint32_t>(*parent.
pset, data.
tracked, data.
label, GetText());
249 editVectorParameter<long long>(*parent.
pset, data.
tracked, data.
label, GetText());
252 editVectorParameter<unsigned long long>(*parent.
pset, data.
tracked, data.
label, GetText());
255 editVectorParameter<double>(*parent.
pset, data.
tracked, data.
label, GetText());
258 editVectorParameter<std::string>(*parent.
pset, data.
tracked, data.
label, GetText());
283 UInt_t keysym =
event->fCode;
285 if (keysym == (UInt_t)gVirtualX->KeysymToKeycode(kKey_Escape)) {
286 TGFrame *
p =
dynamic_cast<TGFrame *
>(
const_cast<TGWindow *
>(GetParent()));
288 TGMainFrame *mp =
dynamic_cast<TGMainFrame *
>(
p);
291 return mp->HandleKey(event);
293 p =
dynamic_cast<TGFrame *
>(
const_cast<TGWindow *
>(p->GetParent()));
297 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 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)
std::vector< std::string > tokenize(std::string const &input, std::string const &separator)
breaks the input string into tokens, delimited by the separator
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)