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<uint8_t>(
table, icol, rowsel);
104 template <
typename T>
107 for (
unsigned int i = 0,
n =
data.size();
i <
n; ++
i) {
118 cfg.getParameter<uint32_t>(
"nbins"),
119 cfg.getParameter<double>(
"min"),
120 cfg.getParameter<double>(
"max"),
134 for (
unsigned int irow = 0,
n =
table.size(); irow <
n; ++irow) {
148 if (
kind ==
"count1d")
149 return std::make_unique<Count1D>(booker,
cfg);
150 if (
kind ==
"hist1d")
151 return std::make_unique<Plot1D>(booker,
cfg);
152 if (
kind ==
"prof1d")
153 return std::make_unique<Profile1D>(booker,
cfg);
161 std::unique_ptr<StringCutObjectSelector<FlatTable::RowView>>
cutptr;
162 std::vector<std::unique_ptr<Plot>>
plots;
174 for (
unsigned int i = 0,
n =
table.size();
i <
n; ++
i) {
192 group.plotPSets =
pset.getParameter<std::vector<edm::ParameterSet>>(
"plots");
193 group.selGroups.emplace_back();
199 consumesMany<FlatTable>();
207 for (
auto &
sels : pair.second.selGroups) {
214 plots.reserve(pair.second.plotPSets.size());
215 for (
const auto &
cfg : pair.second.plotPSets) {
225 std::vector<edm::Handle<FlatTable>> alltables;
226 iEvent.getManyByType(alltables);
227 std::map<std::string, std::pair<const FlatTable *, std::vector<const FlatTable *>>> maintables;
229 for (
const auto &htab : alltables) {
230 if (htab->extension())
232 maintables[htab->name()] = std::make_pair(htab.product(), std::vector<const FlatTable *>());
234 for (
const auto &htab : alltables) {
235 if (htab->extension()) {
236 if (maintables.find(htab->name()) == maintables.end())
237 throw cms::Exception(
"LogicError",
"Missing main table for " + htab->name());
238 maintables[htab->name()].second.push_back(htab.product());
245 if (maintables.find(
name) == maintables.end())
249 if (!
tables.second.empty()) {
256 std::vector<bool> selbits;
257 for (
auto &
sel : pair.second.selGroups) {