16 std::regex
token(
"\\w+");
17 std::sregex_iterator tbegin(
expr.begin(),
expr.end(),
token), tend;
20 std::stringstream
out;
21 std::sregex_iterator
last;
22 for (std::sregex_iterator
i = tbegin;
i != tend;
last =
i, ++
i) {
26 out <<
"getAnyValue(\"" <<
match.str() <<
"\")";
63 cfg.getParameter<uint32_t>(
"nbins"),
64 cfg.getParameter<double>(
"min"),
65 cfg.getParameter<double>(
"max"))) {}
68 plot_->
Fill(std::accumulate(rowsel.begin(), rowsel.end(), 0u));
77 cfg.getParameter<uint32_t>(
"nbins"),
78 cfg.getParameter<double>(
"min"),
79 cfg.getParameter<double>(
"max"))),
86 switch (
table.columnType(icol)) {
88 vfill<float>(
table, icol, rowsel);
91 vfill<int>(
table, icol, rowsel);
94 vfill<uint8_t>(
table, icol, rowsel);
97 vfill<bool>(
table, icol, rowsel);
106 template <
typename T>
109 for (
unsigned int i = 0,
n =
data.size();
i <
n; ++
i) {
120 cfg.getParameter<uint32_t>(
"nbins"),
121 cfg.getParameter<double>(
"min"),
122 cfg.getParameter<double>(
"max"),
136 for (
unsigned int irow = 0,
n =
table.size(); irow <
n; ++irow) {
150 if (
kind ==
"count1d")
151 return std::make_unique<Count1D>(booker,
cfg);
152 if (
kind ==
"hist1d")
153 return std::make_unique<Plot1D>(booker,
cfg);
154 if (
kind ==
"prof1d")
155 return std::make_unique<Profile1D>(booker,
cfg);
163 std::unique_ptr<StringCutObjectSelector<FlatTable::RowView>>
cutptr;
164 std::vector<std::unique_ptr<Plot>>
plots;
176 for (
unsigned int i = 0,
n =
table.size();
i <
n; ++
i) {
194 group.plotPSets =
pset.getParameter<std::vector<edm::ParameterSet>>(
"plots");
195 group.selGroups.emplace_back();
201 consumesMany<FlatTable>();
209 for (
auto &
sels : pair.second.selGroups) {
216 plots.reserve(pair.second.plotPSets.size());
217 for (
const auto &
cfg : pair.second.plotPSets) {
227 std::vector<edm::Handle<FlatTable>> alltables;
228 iEvent.getManyByType(alltables);
229 std::map<std::string, std::pair<const FlatTable *, std::vector<const FlatTable *>>> maintables;
231 for (
const auto &htab : alltables) {
232 if (htab->extension())
234 maintables[htab->name()] = std::make_pair(htab.product(), std::vector<const FlatTable *>());
236 for (
const auto &htab : alltables) {
237 if (htab->extension()) {
238 if (maintables.find(htab->name()) == maintables.end())
239 throw cms::Exception(
"LogicError",
"Missing main table for " + htab->name());
240 maintables[htab->name()].second.push_back(htab.product());
247 if (maintables.find(
name) == maintables.end())
251 if (!
tables.second.empty()) {
258 std::vector<bool> selbits;
259 for (
auto &
sel : pair.second.selGroups) {