61 void endJob()
override;
81 LogInfo(
"HLTMuonVal") <<
"Can't find DQMStore, no results will be saved" << endl;
85 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
88 LogInfo(
"HLTMuonVal") <<
">>> Constructor (HLTOverallSummary) <<<" << endl;
102 LogInfo(
"HLTMuonVal") <<
">>> Analyze (HLTOverallSummary) <<<" << std::endl;
115 LogInfo(
"HLTMuonVal") <<
">>> BeginRun (HLTOverallSummary) <<<" << std::endl;
117 LogInfo(
"HLTMuonVal") <<
">>> " << run.
id() << std::endl;
124 LogInfo(
"HLTMuonVal") <<
">>> EndRun (HLTOverallSummary) <<<" << std::endl;
127 LogInfo(
"HLTMuonVal") <<
"No dqmstore... skipping processing step" << endl;
131 std::vector<string> histoNameVector;
135 float defaultValueIfNotFound = 1.0;
142 muonQualityBit =
dbe_->
get(
"HLT_Muon");
144 if (!muonQualityBit) {
145 LogInfo(
"HLTMuonVal") <<
"Can't find muonQuality bit... making a bit, setting it to zero" << endl;
148 muonQualityBit->
Fill(defaultValueIfNotFound);
152 eleQualityBit =
dbe_->
get(
"HLT_Electron");
154 if (!eleQualityBit) {
155 LogInfo(
"HLTMuonVal") <<
"Can't find eleQuality bit... making a bit, setting it to zero" << endl;
158 eleQualityBit->
Fill(defaultValueIfNotFound);
162 photonQualityBit =
dbe_->
get(
"HLT_Photon");
164 if (!photonQualityBit) {
165 LogInfo(
"HLTMuonVal") <<
"Can't find photonQuality bit... making a bit, setting it to zero" << endl;
168 photonQualityBit->
Fill(defaultValueIfNotFound);
180 dbe_->
book2D(
"reportSummaryMap",
"HLT: ReportSummaryMap", 3, -0.5, 2.5, 1, -0.5, 0.5);
182 dbe_->
book2D(
"certificationSummaryMap",
"HLT: CertificationSummaryMap", 3, -0.5, 2.5, 1, -0.5, 0.5);
184 TH2* reportSummaryMapTH2 = reportSummaryMap->
getTH2F();
186 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
187 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
188 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
190 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
192 TH2* CertificationSummaryMapTH2 = CertificationSummaryMap->
getTH2F();
194 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
195 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
196 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
197 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
207 float hltOverallValue = 1.0;
209 if ((photonValue > 0.99) && (electronValue > 0.99) && (muonValue > 0.99)) {
210 hltOverallValue = 1.0;
213 hltOverallValue = 0.0;
216 hltQualityBit->
Fill(hltOverallValue);
218 unsigned int hltSummaryValue = 0x0;
220 unsigned int ELECTRON_MASK = 0x1;
221 unsigned int PHOTON_MASK = 0x2;
222 unsigned int MUON_MASK = 0x4;
224 if (electronValue > 0.99)
225 hltSummaryValue = hltSummaryValue | ELECTRON_MASK;
226 if (photonValue > 0.99)
227 hltSummaryValue = hltSummaryValue | PHOTON_MASK;
228 if (muonValue > 0.99)
229 hltSummaryValue = hltSummaryValue | MUON_MASK;
231 hltQualitySummaryWord->
Fill(hltSummaryValue);
233 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1, 1), muonValue);
234 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2, 1), electronValue);
235 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3, 1), photonValue);
237 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1, 1), muonValue);
238 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2, 1), electronValue);
239 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3, 1), photonValue);
virtual TH2F * getTH2F() const
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void endRun(const edm::Run &, const edm::EventSetup &) override
dqm::legacy::DQMStore * dbe_
MonitorElement * bookInt(char_string const &name)
Book int.
void analyze(const edm::Event &, const edm::EventSetup &) override
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
#define DEFINE_FWK_MODULE(type)
void beginRun(const edm::Run &, const edm::EventSetup &) override
~HLTOverallSummary() override
void setCurrentFolder(std::string const &fullpath)
dqm::legacy::DQMStore DQMStore
virtual double getFloatValue() const
MonitorElement * bookFloat(char_string const &name)
Book float.
edm::ParameterSet parameters_
HLTOverallSummary(const edm::ParameterSet &pset)
dqm::legacy::MonitorElement MonitorElement