19 modulesErrorsFound =
nullptr;
20 modulesWarningsFound =
nullptr;
21 categoriesWarningsFound =
nullptr;
22 categoriesErrorsFound =
nullptr;
38 theDbe->setCurrentFolder(directoryName);
73 vector<string> entries;
74 entries.push_back(directoryName +
"/Warnings/modules_warnings");
75 entries.push_back(directoryName +
"/Errors/modules_errors");
76 entries.push_back(directoryName +
"/Warnings/categories_warnings");
77 entries.push_back(directoryName +
"/Errors/categories_errors");
82 for(
auto ent = entries.begin();
83 ent != entries.end(); ++ent) {
95 if(theDbe->get(*ent)){
96 if (TH1 *rootHisto = me->
getTH1()) {
103 if( rootHisto->GetBinContent(
bin)>0){
105 binContent.push_back(rootHisto->GetBinContent(
bin));
106 binLabel.emplace_back(rootHisto->GetXaxis()->GetBinLabel(
bin));
113 theDbe->setCurrentFolder(directoryName +
"/Warnings");
114 modulesWarningsFound = theDbe->get(directoryName +
"/Warnings/modulesWarningsFound");
115 if (modulesWarningsFound) theDbe->removeElement(modulesWarningsFound->getName());
117 modulesWarningsFound = theDbe->book1D(
"modulesWarningsFound",
"Warnings per module", binContent.size(), 0, binContent.size());
119 modulesWarningsFound = theDbe->book1D(
"modulesWarningsFound",
"Warnings per module", 1, 0, 1);
120 modulesWarningsFound->setBinLabel(1,
"Module name");
122 for (
int i=0;
i<nonzeros; ++
i){
123 if(modulesWarningsFound!=
nullptr){
126 modulesWarningsFound->setBinContent(
i+1,binContent[
i]);
127 modulesWarningsFound->setBinLabel(i+1,binLabel[i]);
130 if(nonzeros>4) modulesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
133 theDbe->setCurrentFolder(directoryName +
"/Errors");
134 modulesErrorsFound = theDbe->get(directoryName +
"/Errors/modulesErrorsFound");
135 if (modulesErrorsFound) theDbe->removeElement(modulesErrorsFound->getName());
137 modulesErrorsFound = theDbe->book1D(
"modulesErrorsFound",
"Errors per module",binContent.size(), 0, binContent.size() );
139 modulesErrorsFound = theDbe->book1D(
"modulesErrorsFound",
"Errors per module",1, 0, 1 );
140 modulesErrorsFound->setBinLabel(1,
"Module name");
142 for (
int i=0;
i<nonzeros; ++
i){
143 if(modulesErrorsFound!=
nullptr){
145 modulesErrorsFound->setBinContent(
i+1,binContent[
i]);
146 modulesErrorsFound->setBinLabel(i+1,binLabel[i]);
149 if(nonzeros>4) modulesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
152 theDbe->setCurrentFolder(directoryName +
"/Warnings");
153 categoriesWarningsFound = theDbe->get(directoryName +
"/Warnings/categoriesWarningsFound");
154 if (categoriesWarningsFound) theDbe->removeElement(categoriesWarningsFound->getName());
156 categoriesWarningsFound = theDbe->book1D(
"categoriesWarningsFound",
"Warnings per category", binContent.size(),0,binContent.size());
158 categoriesWarningsFound = theDbe->book1D(
"categoriesWarningsFound",
"Warnings per category", 1,0,1);
159 categoriesWarningsFound->setBinLabel(1,
"Category name");
161 for (
int i=0;
i<nonzeros; ++
i){
162 if(categoriesWarningsFound!=
nullptr){
165 categoriesWarningsFound->setBinContent(
i+1,binContent[
i]);
166 categoriesWarningsFound->setBinLabel(i+1,binLabel[i]);
169 if(nonzeros>4) categoriesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
172 theDbe->setCurrentFolder(directoryName +
"/Errors");
173 categoriesErrorsFound = theDbe->get(directoryName +
"/Errors/categoriesErrorsFound");
174 if (categoriesErrorsFound) theDbe->removeElement(categoriesErrorsFound->getName());
176 categoriesErrorsFound = theDbe->book1D(
"categoriesErrorsFound",
"Errors per category", binContent.size(),0,binContent.size());
178 categoriesErrorsFound = theDbe->book1D(
"categoriesErrorsFound",
"Errors per category", 1,0,1);
179 categoriesErrorsFound->setBinLabel(1,
"Category name");
181 for (
int i=0;
i<nonzeros; ++
i){
182 if(categoriesErrorsFound!=
nullptr){
184 categoriesErrorsFound->setBinContent(
i+1,binContent[
i]);
185 categoriesErrorsFound->setBinLabel(i+1,binLabel[i]);
188 if(nonzeros>4) categoriesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
T getParameter(std::string const &) const
DQMMessageLoggerClient(const edm::ParameterSet &)
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void beginRun(const edm::Run &, const edm::EventSetup &) override
bin
set the eta bin as selection string.
~DQMMessageLoggerClient() override
int getNbinsX() const
get # of bins in X-axis
void endRun(const edm::Run &, const edm::EventSetup &) override