22 std::regex
token(
"\\w+");
23 std::sregex_iterator tbegin(expr.begin(), expr.end(),
token), tend;
26 std::stringstream
out;
27 std::sregex_iterator
last;
28 for (std::sregex_iterator
i = tbegin;
i != tend;
last =
i, ++
i) {
32 out <<
"getAnyValue(\"" <<
match.str() <<
"\")";
71 cfg.getParameter<uint32_t>(
"nbins"),
72 cfg.getParameter<double>(
"min"),
73 cfg.getParameter<double>(
"max"))) {}
76 plot_->
Fill(std::accumulate(rowsel.begin(), rowsel.end(), 0u));
85 cfg.getParameter<uint32_t>(
"nbins"),
86 cfg.getParameter<double>(
"min"),
87 cfg.getParameter<double>(
"max"))),
94 switch (
table.columnType(icol)) {
96 vfill<float>(
table, icol, rowsel);
99 vfill<int>(
table, icol, rowsel);
102 vfill<int8_t>(
table, icol, rowsel);
105 vfill<uint8_t>(
table, icol, rowsel);
108 vfill<bool>(
table, icol, rowsel);
117 template <
typename T>
120 for (
unsigned int i = 0,
n =
data.size();
i <
n; ++
i) {
131 cfg.getParameter<uint32_t>(
"nbins"),
132 cfg.getParameter<double>(
"min"),
133 cfg.getParameter<double>(
"max"),
147 for (
unsigned int irow = 0,
n =
table.size(); irow <
n; ++irow) {
161 if (
kind ==
"count1d")
162 return std::make_unique<Count1D>(booker,
cfg);
163 if (
kind ==
"hist1d")
164 return std::make_unique<Plot1D>(booker,
cfg);
165 if (
kind ==
"prof1d")
166 return std::make_unique<Profile1D>(booker,
cfg);
174 std::unique_ptr<StringCutObjectSelector<FlatTable::RowView>>
cutptr;
175 std::vector<std::unique_ptr<Plot>>
plots;
187 for (
unsigned int i = 0,
n =
table.size();
i <
n; ++
i) {
205 group.plotPSets =
pset.getParameter<std::vector<edm::ParameterSet>>(
"plots");
206 group.selGroups.emplace_back();
212 consumesMany<FlatTable>();
219 sels.setComment(
"a paramerter set to define the selections to be made from the table row");
228 "column",
true,
edm::Comment(
"name of the raw to fill the content of the plot"));
230 "xcolumn",
true,
edm::Comment(
"name of the raw to fill the x content of the plot"));
232 "ycolumn",
true,
edm::Comment(
"name of the raw to fill the y content of the plot"));
235 plot.setComment(
"a parameter set that defines a DQM histogram");
245 "a parameter set to define all the plots to be made from a table row selected from the name of the PSet");
250 vplots.setComment(
"a parameter set to define all the set of plots to be made from the tables");
262 for (
auto &
sels : pair.second.selGroups) {
269 plots.reserve(pair.second.plotPSets.size());
270 for (
const auto &
cfg : pair.second.plotPSets) {
280 std::vector<edm::Handle<FlatTable>> alltables;
281 iEvent.getManyByType(alltables);
282 std::map<std::string, std::pair<const FlatTable *, std::vector<const FlatTable *>>> maintables;
284 for (
const auto &htab : alltables) {
285 if (htab->extension())
287 maintables[htab->name()] = std::make_pair(htab.product(), std::vector<const FlatTable *>());
289 for (
const auto &htab : alltables) {
290 if (htab->extension()) {
291 if (maintables.find(htab->name()) == maintables.end())
292 throw cms::Exception(
"LogicError",
"Missing main table for " + htab->name());
293 maintables[htab->name()].second.push_back(htab.product());
300 if (maintables.find(
name) == maintables.end())
304 if (!
tables.second.empty()) {
311 std::vector<bool> selbits;
312 for (
auto &
sel : pair.second.selGroups) {
void addExtension(const FlatTable &extension)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
std::vector< edm::ParameterSet > plotPSets
const std::string & name() const
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
virtual void fill(const FlatTable &table, const std::vector< bool > &rowsel)=0
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< SelGroupConfig > selGroups
std::unique_ptr< StringCutObjectSelector< FlatTable::RowView > > cutptr
void analyze(const edm::Event &, const edm::EventSetup &) override
nanoaod::FlatTable FlatTable
static std::unique_ptr< Plot > makePlot(DQMStore::IBooker &booker, const edm::ParameterSet &cfg)
Plot1D(DQMStore::IBooker &booker, const edm::ParameterSet &cfg)
NanoAODDQM(const edm::ParameterSet &)
Profile1D(DQMStore::IBooker &booker, const edm::ParameterSet &cfg)
void setComment(std::string const &value)
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
std::map< std::string, GroupConfig > groups_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void vfill(const FlatTable &table, int icol, const std::vector< bool > &rowsel)
#define DEFINE_FWK_MODULE(type)
void fill(const FlatTable &table, const std::vector< bool > &rowsel) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Count1D(DQMStore::IBooker &booker, const edm::ParameterSet &cfg)
void fill(const FlatTable &table, const std::vector< bool > &rowsel) override
std::vector< std::unique_ptr< Plot > > plots
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string & getName() const
get name of ME
SelGroupConfig(const std::string &nam, const std::string &cut)
char data[epos_bytes_allocation]
StringCutObjectSelector< FlatTable::RowView > Selector
void fillSel(const FlatTable &table, std::vector< bool > &out)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void fill(const FlatTable &table, const std::vector< bool > &rowsel) override