31 categories_errors =
nullptr;
32 categories_warnings =
nullptr;
33 modules_errors =
nullptr;
34 modules_warnings =
nullptr;
35 total_errors =
nullptr;
36 total_warnings =
nullptr;
39 categories_vector =
parameters.getParameter<vector<string> >(
"Categories");
40 directoryName =
parameters.getParameter<
string>(
"Directory");
41 errorSummary_ = consumes<std::vector<edm::ErrorSummaryEntry> >(
53 for (
unsigned int i = 0;
i < categories_vector.size();
i++) {
54 categoryMap.insert(pair<string, int>(categories_vector[
i],
i + 1));
59 using stringvec = vector<std::string>;
61 stringvec
const& trigpaths = tns->getTrigPaths();
63 for (
auto const& trigpath : trigpaths) {
64 stringvec
strings = tns->getTrigPathModules(trigpath);
67 moduleMap.insert(pair<string, int>(
k, moduleMap.size() + 1));
74 if (!moduleMap.empty()) {
76 modules_errors = ibooker.
book1D(
"modules_errors",
"Errors per module", moduleMap.size(), 0, moduleMap.size());
79 modules_warnings = ibooker.
book1D(
"modules_warnings",
"Warnings per module", moduleMap.size(), 0, moduleMap.size());
81 for (
auto it = moduleMap.begin(); it != moduleMap.end(); ++it) {
82 modules_errors->
setBinLabel((*it).second, (*it).first);
83 modules_warnings->setBinLabel((*it).second, (*it).first);
85 modules_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
86 modules_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
89 if (!categoryMap.empty()) {
92 ibooker.
book1D(
"categories_errors",
"Errors per category", categoryMap.size(), 0, categoryMap.size());
95 ibooker.
book1D(
"categories_warnings",
"Warnings per category", categoryMap.size(), 0, categoryMap.size());
97 for (
auto it = categoryMap.begin(); it != categoryMap.end(); ++it) {
98 categories_errors->
setBinLabel((*it).second, (*it).first);
99 categories_warnings->setBinLabel((*it).second, (*it).first);
101 categories_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
102 categories_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
107 total_warnings = ibooker.
book1D(
"total_warnings",
"Total warnings per event",
nbins, -0.5,
nbins + 0.5);
109 total_errors = ibooker.
book1D(
"total_errors",
"Total errors per event",
nbins, -0.5,
nbins + 0.5);
114 string s =
out.str();
115 total_errors->setBinLabel(
i + 1,
s);
116 total_warnings->setBinLabel(
i + 1,
s);
135 if (total_errors !=
nullptr) {
136 total_errors->Fill(0);
138 if (total_warnings !=
nullptr) {
139 total_warnings->Fill(0);
146 w += (*errors)[
i].count;
148 e += (*errors)[
i].count;
151 if (total_errors !=
nullptr) {
152 total_errors->Fill(
e);
154 if (total_warnings !=
nullptr) {
155 total_warnings->Fill(
w);
165 if (categories_errors !=
nullptr) {
167 if (it != categoryMap.end()) {
169 categories_errors->Fill((*it).second - 1, (*
errors)[
i].count);
175 if (modules_errors !=
nullptr) {
177 string s = (*errors)[
i].module;
178 size_t pos =
s.find(
':');
179 string s_temp =
s.substr(
pos + 1,
s.size());
180 auto it = moduleMap.find(s_temp);
181 if (it != moduleMap.end()) {
183 modules_errors->Fill((*it).second - 1, (*
errors)[
i].count);
188 if (categories_warnings !=
nullptr) {
190 if (it != categoryMap.end()) {
192 categories_warnings->Fill((*it).second - 1, (*
errors)[
i].count);
199 if (modules_warnings !=
nullptr) {
201 string s = (*errors)[
i].module;
202 size_t pos =
s.find(
':');
203 string s_temp =
s.substr(
pos + 1,
s.size());
204 auto it = moduleMap.find(s_temp);
205 if (it != moduleMap.end()) {
207 modules_warnings->Fill((*it).second - 1, (*
errors)[
i].count);