19 modulesErrorsFound =
nullptr;
20 modulesWarningsFound =
nullptr;
21 categoriesWarningsFound =
nullptr;
22 categoriesErrorsFound =
nullptr;
38 theDbe->setCurrentFolder(directoryName);
69 vector<string> entries;
70 entries.push_back(directoryName +
"/Warnings/modules_warnings");
71 entries.push_back(directoryName +
"/Errors/modules_errors");
72 entries.push_back(directoryName +
"/Warnings/categories_warnings");
73 entries.push_back(directoryName +
"/Errors/categories_errors");
78 for(
auto ent = entries.begin();
79 ent != entries.end(); ++ent) {
91 if(theDbe->get(*ent)){
92 if (TH1 *rootHisto = me->
getTH1()) {
99 if( rootHisto->GetBinContent(
bin)>0){
101 binContent.push_back(rootHisto->GetBinContent(
bin));
102 binLabel.emplace_back(rootHisto->GetXaxis()->GetBinLabel(
bin));
109 theDbe->setCurrentFolder(directoryName +
"/Warnings");
110 modulesWarningsFound = theDbe->get(directoryName +
"/Warnings/modulesWarningsFound");
111 if (modulesWarningsFound) theDbe->removeElement(modulesWarningsFound->getName());
113 modulesWarningsFound = theDbe->book1D(
"modulesWarningsFound",
"Warnings per module", binContent.size(), 0, binContent.size());
115 modulesWarningsFound = theDbe->book1D(
"modulesWarningsFound",
"Warnings per module", 1, 0, 1);
116 modulesWarningsFound->setBinLabel(1,
"Module name");
118 for (
int i=0;
i<nonzeros; ++
i){
119 if(modulesWarningsFound!=
nullptr){
122 modulesWarningsFound->setBinContent(
i+1,binContent[
i]);
123 modulesWarningsFound->setBinLabel(i+1,binLabel[i]);
126 if(nonzeros>4) modulesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
129 theDbe->setCurrentFolder(directoryName +
"/Errors");
130 modulesErrorsFound = theDbe->get(directoryName +
"/Errors/modulesErrorsFound");
131 if (modulesErrorsFound) theDbe->removeElement(modulesErrorsFound->getName());
133 modulesErrorsFound = theDbe->book1D(
"modulesErrorsFound",
"Errors per module",binContent.size(), 0, binContent.size() );
135 modulesErrorsFound = theDbe->book1D(
"modulesErrorsFound",
"Errors per module",1, 0, 1 );
136 modulesErrorsFound->setBinLabel(1,
"Module name");
138 for (
int i=0;
i<nonzeros; ++
i){
139 if(modulesErrorsFound!=
nullptr){
141 modulesErrorsFound->setBinContent(
i+1,binContent[
i]);
142 modulesErrorsFound->setBinLabel(i+1,binLabel[i]);
145 if(nonzeros>4) modulesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
148 theDbe->setCurrentFolder(directoryName +
"/Warnings");
149 categoriesWarningsFound = theDbe->get(directoryName +
"/Warnings/categoriesWarningsFound");
150 if (categoriesWarningsFound) theDbe->removeElement(categoriesWarningsFound->getName());
152 categoriesWarningsFound = theDbe->book1D(
"categoriesWarningsFound",
"Warnings per category", binContent.size(),0,binContent.size());
154 categoriesWarningsFound = theDbe->book1D(
"categoriesWarningsFound",
"Warnings per category", 1,0,1);
155 categoriesWarningsFound->setBinLabel(1,
"Category name");
157 for (
int i=0;
i<nonzeros; ++
i){
158 if(categoriesWarningsFound!=
nullptr){
161 categoriesWarningsFound->setBinContent(
i+1,binContent[
i]);
162 categoriesWarningsFound->setBinLabel(i+1,binLabel[i]);
165 if(nonzeros>4) categoriesWarningsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
168 theDbe->setCurrentFolder(directoryName +
"/Errors");
169 categoriesErrorsFound = theDbe->get(directoryName +
"/Errors/categoriesErrorsFound");
170 if (categoriesErrorsFound) theDbe->removeElement(categoriesErrorsFound->getName());
172 categoriesErrorsFound = theDbe->book1D(
"categoriesErrorsFound",
"Errors per category", binContent.size(),0,binContent.size());
174 categoriesErrorsFound = theDbe->book1D(
"categoriesErrorsFound",
"Errors per category", 1,0,1);
175 categoriesErrorsFound->setBinLabel(1,
"Category name");
177 for (
int i=0;
i<nonzeros; ++
i){
178 if(categoriesErrorsFound!=
nullptr){
180 categoriesErrorsFound->setBinContent(
i+1,binContent[
i]);
181 categoriesErrorsFound->setBinLabel(i+1,binLabel[i]);
184 if(nonzeros>4) categoriesErrorsFound->getTH1()->GetXaxis()->LabelsOption(
"v");
T getParameter(std::string const &) const
DQMMessageLoggerClient(const edm::ParameterSet &)
void analyze(const edm::Event &, 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