62 modulesErrorsFound =
nullptr;
63 modulesWarningsFound =
nullptr;
64 categoriesWarningsFound =
nullptr;
65 categoriesErrorsFound =
nullptr;
66 directoryName =
parameters.getParameter<
string>(
"Directory");
75 if (theDbe !=
nullptr) {
76 theDbe->setCurrentFolder(directoryName);
96 vector<string> entries;
97 entries.push_back(directoryName +
"/Warnings/modules_warnings");
98 entries.push_back(directoryName +
"/Errors/modules_errors");
99 entries.push_back(directoryName +
"/Warnings/categories_warnings");
100 entries.push_back(directoryName +
"/Errors/categories_errors");
104 for (
auto ent = entries.begin(); ent != entries.end(); ++ent) {
114 if (theDbe->get(*ent)) {
115 if (TH1 *rootHisto =
me->getTH1()) {
121 if (rootHisto->GetBinContent(
bin) > 0) {
123 binContent.push_back(rootHisto->GetBinContent(
bin));
124 binLabel.emplace_back(rootHisto->GetXaxis()->GetBinLabel(
bin));
130 theDbe->setCurrentFolder(directoryName +
"/Warnings");
131 modulesWarningsFound = theDbe->get(directoryName +
"/Warnings/modulesWarningsFound");
133 modulesWarningsFound = theDbe->book1D(
134 "modulesWarningsFound",
"Warnings per module", binContent.size(), 0, binContent.size());
136 modulesWarningsFound = theDbe->book1D(
"modulesWarningsFound",
"Warnings per module", 1, 0, 1);
137 modulesWarningsFound->setBinLabel(1,
"Module name");
139 for (
int i = 0;
i < nonzeros; ++
i) {
140 if (modulesWarningsFound !=
nullptr) {
143 modulesWarningsFound->setBinContent(
i + 1, binContent[
i]);
144 modulesWarningsFound->setBinLabel(
i + 1, binLabel[
i]);
148 modulesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
151 theDbe->setCurrentFolder(directoryName +
"/Errors");
152 modulesErrorsFound = theDbe->get(directoryName +
"/Errors/modulesErrorsFound");
155 theDbe->book1D(
"modulesErrorsFound",
"Errors per module", binContent.size(), 0, binContent.size());
157 modulesErrorsFound = theDbe->book1D(
"modulesErrorsFound",
"Errors per module", 1, 0, 1);
158 modulesErrorsFound->setBinLabel(1,
"Module name");
160 for (
int i = 0;
i < nonzeros; ++
i) {
161 if (modulesErrorsFound !=
nullptr) {
163 modulesErrorsFound->setBinContent(
i + 1, binContent[
i]);
164 modulesErrorsFound->setBinLabel(
i + 1, binLabel[
i]);
168 modulesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
171 theDbe->setCurrentFolder(directoryName +
"/Warnings");
172 categoriesWarningsFound = theDbe->get(directoryName +
"/Warnings/categoriesWarningsFound");
174 categoriesWarningsFound = theDbe->book1D(
175 "categoriesWarningsFound",
"Warnings per category", binContent.size(), 0, binContent.size());
177 categoriesWarningsFound = theDbe->book1D(
"categoriesWarningsFound",
"Warnings per category", 1, 0, 1);
178 categoriesWarningsFound->setBinLabel(1,
"Category name");
180 for (
int i = 0;
i < nonzeros; ++
i) {
181 if (categoriesWarningsFound !=
nullptr) {
184 categoriesWarningsFound->setBinContent(
i + 1, binContent[
i]);
185 categoriesWarningsFound->setBinLabel(
i + 1, binLabel[
i]);
189 categoriesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
192 theDbe->setCurrentFolder(directoryName +
"/Errors");
193 categoriesErrorsFound = theDbe->get(directoryName +
"/Errors/categoriesErrorsFound");
195 categoriesErrorsFound = theDbe->book1D(
196 "categoriesErrorsFound",
"Errors per category", binContent.size(), 0, binContent.size());
198 categoriesErrorsFound = theDbe->book1D(
"categoriesErrorsFound",
"Errors per category", 1, 0, 1);
199 categoriesErrorsFound->setBinLabel(1,
"Category name");
201 for (
int i = 0;
i < nonzeros; ++
i) {
202 if (categoriesErrorsFound !=
nullptr) {
204 categoriesErrorsFound->setBinContent(
i + 1, binContent[
i]);
205 categoriesErrorsFound->setBinLabel(
i + 1, binLabel[
i]);
209 categoriesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
dqm::legacy::DQMStore DQMStore
MonitorElement * modulesErrorsFound
edm::ParameterSet parameters
DQMMessageLoggerClient(const edm::ParameterSet &)
std::vector< std::string > binLabel
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * categoriesErrorsFound
std::string directoryName
#define DEFINE_FWK_MODULE(type)
MonitorElement * categoriesWarningsFound
void beginRun(const edm::Run &, const edm::EventSetup &) override
~DQMMessageLoggerClient() override
MonitorElement * modulesWarningsFound
dqm::legacy::MonitorElement MonitorElement
std::vector< Double_t > binContent
void endRun(const edm::Run &, const edm::EventSetup &) override