32 categories_errors =
nullptr;
33 categories_warnings =
nullptr;
34 modules_errors =
nullptr;
35 modules_warnings =
nullptr;
36 total_errors =
nullptr;
37 total_warnings =
nullptr;
40 categories_vector =
parameters.getParameter<vector<string> >(
"Categories");
41 directoryName =
parameters.getParameter<
string>(
"Directory");
42 errorSummary_ = consumes<std::vector<edm::ErrorSummaryEntry> >(
54 for (
unsigned int i = 0;
i < categories_vector.size();
i++) {
55 categoryMap.insert(pair<string, int>(categories_vector[
i],
i + 1));
60 using stringvec = vector<std::string>;
62 stringvec
const& trigpaths = tns->getTrigPaths();
64 for (
auto const& trigpath : trigpaths) {
65 stringvec
strings = tns->getTrigPathModules(trigpath);
68 moduleMap.insert(pair<string, int>(
k, moduleMap.size() + 1));
75 if (!moduleMap.empty()) {
77 modules_errors = ibooker.
book1D(
"modules_errors",
"Errors per module", moduleMap.size(), 0, moduleMap.size());
80 modules_warnings = ibooker.
book1D(
"modules_warnings",
"Warnings per module", moduleMap.size(), 0, moduleMap.size());
82 for (
auto it = moduleMap.begin(); it != moduleMap.end(); ++it) {
83 modules_errors->
setBinLabel((*it).second, (*it).first);
84 modules_warnings->setBinLabel((*it).second, (*it).first);
86 modules_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
87 modules_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
90 if (!categoryMap.empty()) {
93 ibooker.
book1D(
"categories_errors",
"Errors per category", categoryMap.size(), 0, categoryMap.size());
96 ibooker.
book1D(
"categories_warnings",
"Warnings per category", categoryMap.size(), 0, categoryMap.size());
98 for (
auto it = categoryMap.begin(); it != categoryMap.end(); ++it) {
99 categories_errors->
setBinLabel((*it).second, (*it).first);
100 categories_warnings->setBinLabel((*it).second, (*it).first);
102 categories_warnings->getTH1()->GetXaxis()->LabelsOption(
"v");
103 categories_errors->getTH1()->GetXaxis()->LabelsOption(
"v");
108 total_warnings = ibooker.
book1D(
"total_warnings",
"Total warnings per event",
nbins, -0.5,
nbins + 0.5);
110 total_errors = ibooker.
book1D(
"total_errors",
"Total errors per event",
nbins, -0.5,
nbins + 0.5);
115 string s =
out.str();
116 total_errors->setBinLabel(
i + 1,
s);
117 total_warnings->setBinLabel(
i + 1,
s);
136 if (total_errors !=
nullptr) {
137 total_errors->Fill(0);
139 if (total_warnings !=
nullptr) {
140 total_warnings->Fill(0);
147 w += (*errors)[
i].count;
149 e += (*errors)[
i].count;
152 if (total_errors !=
nullptr) {
153 total_errors->Fill(
e);
155 if (total_warnings !=
nullptr) {
156 total_warnings->Fill(
w);
166 if (categories_errors !=
nullptr) {
168 if (it != categoryMap.end()) {
170 categories_errors->Fill((*it).second - 1, (*
errors)[
i].count);
176 if (modules_errors !=
nullptr) {
178 string s = (*errors)[
i].module;
179 size_t pos =
s.find(
':');
180 string s_temp =
s.substr(
pos + 1,
s.size());
181 auto it = moduleMap.find(s_temp);
182 if (it != moduleMap.end()) {
184 modules_errors->Fill((*it).second - 1, (*
errors)[
i].count);
189 if (categories_warnings !=
nullptr) {
191 if (it != categoryMap.end()) {
193 categories_warnings->Fill((*it).second - 1, (*
errors)[
i].count);
200 if (modules_warnings !=
nullptr) {
202 string s = (*errors)[
i].module;
203 size_t pos =
s.find(
':');
204 string s_temp =
s.substr(
pos + 1,
s.size());
205 auto it = moduleMap.find(s_temp);
206 if (it != moduleMap.end()) {
208 modules_warnings->Fill((*it).second - 1, (*
errors)[
i].count);