18 std::regex
token(
"\\w+");
19 std::sregex_iterator tbegin(
expr.begin(),
expr.end(),
token), tend;
22 std::stringstream
out;
23 std::sregex_iterator
last;
24 for (std::sregex_iterator
i = tbegin;
i != tend;
last =
i, ++
i) {
28 out <<
"getAnyValue(\"" <<
match.str() <<
"\")";
65 cfg.getParameter<uint32_t>(
"nbins"),
66 cfg.getParameter<double>(
"min"),
67 cfg.getParameter<double>(
"max"))) {}
70 plot_->
Fill(std::accumulate(rowsel.begin(), rowsel.end(), 0u));
79 cfg.getParameter<uint32_t>(
"nbins"),
80 cfg.getParameter<double>(
"min"),
81 cfg.getParameter<double>(
"max"))),
88 switch (
table.columnType(icol)) {
90 vfill<float>(
table, icol, rowsel);
93 vfill<int>(
table, icol, rowsel);
96 vfill<uint8_t>(
table, icol, rowsel);
99 vfill<bool>(
table, icol, rowsel);
108 template <
typename T>
111 for (
unsigned int i = 0,
n =
data.size();
i <
n; ++
i) {
122 cfg.getParameter<uint32_t>(
"nbins"),
123 cfg.getParameter<double>(
"min"),
124 cfg.getParameter<double>(
"max"),
138 for (
unsigned int irow = 0,
n =
table.size(); irow <
n; ++irow) {
152 if (
kind ==
"count1d")
153 return std::make_unique<Count1D>(booker,
cfg);
154 if (
kind ==
"hist1d")
155 return std::make_unique<Plot1D>(booker,
cfg);
156 if (
kind ==
"prof1d")
157 return std::make_unique<Profile1D>(booker,
cfg);
165 std::unique_ptr<StringCutObjectSelector<FlatTable::RowView>>
cutptr;
166 std::vector<std::unique_ptr<Plot>>
plots;
178 for (
unsigned int i = 0,
n =
table.size();
i <
n; ++
i) {
196 group.plotPSets =
pset.getParameter<std::vector<edm::ParameterSet>>(
"plots");
197 group.selGroups.emplace_back();
203 consumesMany<FlatTable>();
211 for (
auto &
sels : pair.second.selGroups) {
218 plots.reserve(pair.second.plotPSets.size());
219 for (
const auto &
cfg : pair.second.plotPSets) {
229 std::vector<edm::Handle<FlatTable>> alltables;
230 iEvent.getManyByType(alltables);
231 std::map<std::string, std::pair<const FlatTable *, std::vector<const FlatTable *>>> maintables;
233 for (
const auto &htab : alltables) {
234 if (htab->extension())
236 maintables[htab->name()] = std::make_pair(htab.product(), std::vector<const FlatTable *>());
238 for (
const auto &htab : alltables) {
239 if (htab->extension()) {
240 if (maintables.find(htab->name()) == maintables.end())
241 throw cms::Exception(
"LogicError",
"Missing main table for " + htab->name());
242 maintables[htab->name()].second.push_back(htab.product());
249 if (maintables.find(
name) == maintables.end())
253 if (!
tables.second.empty()) {
260 std::vector<bool> selbits;
261 for (
auto &
sel : pair.second.selGroups) {