30 categories_errors =
nullptr;
31 categories_warnings =
nullptr;
32 modules_errors =
nullptr;
33 modules_warnings =
nullptr;
34 total_errors =
nullptr;
35 total_warnings =
nullptr;
38 categories_vector =
parameters.getParameter<vector<string> >(
"Categories");
39 directoryName =
parameters.getParameter<
string>(
"Directory");
40 errorSummary_ = consumes<std::vector<edm::ErrorSummaryEntry> >(
52 for (
unsigned int i = 0;
i < categories_vector.size();
i++) {
53 categoryMap.insert(pair<string, int>(categories_vector[
i],
i + 1));
58 using stringvec = vector<std::string>;
60 stringvec
const& trigpaths = tns->getTrigPaths();
62 for (
auto const& trigpath : trigpaths) {
63 stringvec
strings = tns->getTrigPathModules(trigpath);
66 moduleMap.insert(pair<string, int>(
k, moduleMap.size() + 1));
73 if (!moduleMap.empty()) {
75 modules_errors = ibooker.
book1D(
"modules_errors",
"Errors per module", moduleMap.size(), 0, moduleMap.size());
78 modules_warnings = ibooker.
book1D(
"modules_warnings",
"Warnings per module", moduleMap.size(), 0, moduleMap.size());
80 for (
auto it = moduleMap.begin(); it != moduleMap.end(); ++it) {
81 modules_errors->
setBinLabel((*it).second, (*it).first);
82 modules_warnings->setBinLabel((*it).second, (*it).first);
84 modules_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
85 modules_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
88 if (!categoryMap.empty()) {
91 ibooker.
book1D(
"categories_errors",
"Errors per category", categoryMap.size(), 0, categoryMap.size());
94 ibooker.
book1D(
"categories_warnings",
"Warnings per category", categoryMap.size(), 0, categoryMap.size());
96 for (
auto it = categoryMap.begin(); it != categoryMap.end(); ++it) {
97 categories_errors->
setBinLabel((*it).second, (*it).first);
98 categories_warnings->setBinLabel((*it).second, (*it).first);
100 categories_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
101 categories_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
106 total_warnings = ibooker.
book1D(
"total_warnings",
"Total warnings per event",
nbins, -0.5,
nbins + 0.5);
108 total_errors = ibooker.
book1D(
"total_errors",
"Total errors per event",
nbins, -0.5,
nbins + 0.5);
113 string s =
out.str();
114 total_errors->setBinLabel(
i + 1,
s);
115 total_warnings->setBinLabel(
i + 1,
s);
134 if (total_errors !=
nullptr) {
135 total_errors->Fill(0);
137 if (total_warnings !=
nullptr) {
138 total_warnings->Fill(0);
145 w += (*errors)[
i].count;
147 e += (*errors)[
i].count;
150 if (total_errors !=
nullptr) {
151 total_errors->Fill(
e);
153 if (total_warnings !=
nullptr) {
154 total_warnings->Fill(
w);
164 if (categories_errors !=
nullptr) {
166 if (it != categoryMap.end()) {
168 categories_errors->Fill((*it).second - 1, (*
errors)[
i].count);
174 if (modules_errors !=
nullptr) {
176 string s = (*errors)[
i].module;
177 size_t pos =
s.find(
':');
178 string s_temp =
s.substr(
pos + 1,
s.size());
179 auto it = moduleMap.find(s_temp);
180 if (it != moduleMap.end()) {
182 modules_errors->Fill((*it).second - 1, (*
errors)[
i].count);
187 if (categories_warnings !=
nullptr) {
189 if (it != categoryMap.end()) {
191 categories_warnings->Fill((*it).second - 1, (*
errors)[
i].count);
198 if (modules_warnings !=
nullptr) {
200 string s = (*errors)[
i].module;
201 size_t pos =
s.find(
':');
202 string s_temp =
s.substr(
pos + 1,
s.size());
203 auto it = moduleMap.find(s_temp);
204 if (it != moduleMap.end()) {
206 modules_warnings->Fill((*it).second - 1, (*
errors)[
i].count);