#include <DTOfflineSummaryClients.h>
Public Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginRun (edm::Run const &run, edm::EventSetup const &eSetup) |
BeginRun. | |
DTOfflineSummaryClients (const edm::ParameterSet &ps) | |
Constructor. | |
void | endJob (void) |
EndJob. | |
void | endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) |
EndLumi. | |
void | endRun (edm::Run const &run, edm::EventSetup const &eSetup) |
DQM Client Diagnostic. | |
virtual | ~DTOfflineSummaryClients () |
Destructor. | |
Private Attributes | |
DQMStore * | dbe |
int | nevents |
MonitorElement * | summaryReport |
MonitorElement * | summaryReportMap |
std::vector< MonitorElement * > | theSummaryContents |
* DQM Client for global summary
Definition at line 23 of file DTOfflineSummaryClients.h.
DTOfflineSummaryClients::DTOfflineSummaryClients | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 29 of file DTOfflineSummaryClients.cc.
References dbe, and cppFunctionSkipper::operator.
: nevents(0) { LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients]: Constructor"; dbe = Service<DQMStore>().operator->(); }
DTOfflineSummaryClients::~DTOfflineSummaryClients | ( | ) | [virtual] |
Destructor.
Definition at line 38 of file DTOfflineSummaryClients.cc.
References nevents.
{ LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "DTOfflineSummaryClients: analyzed " << nevents << " events"; }
void DTOfflineSummaryClients::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 81 of file DTOfflineSummaryClients.cc.
References nevents.
{ nevents++; if(nevents%1000 == 0) { LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients] Analyze #Run: " << event.id().run() << " #Event: " << event.id().event() << " LS: " << event.luminosityBlock() << endl; } }
void DTOfflineSummaryClients::beginRun | ( | edm::Run const & | run, |
edm::EventSetup const & | eSetup | ||
) | [virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 43 of file DTOfflineSummaryClients.cc.
References DQMStore::book2D(), DQMStore::bookFloat(), dbe, MonitorElement::Fill(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), hcal_dqm_sourceclient-file_cfg::streams, summaryReport, summaryReportMap, and theSummaryContents.
{ LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: BeginRun"; // book the summary histos dbe->setCurrentFolder("DT/EventInfo"); summaryReport = dbe->bookFloat("reportSummary"); // Initialize to 1 so that no alarms are thrown at the beginning of the run summaryReport->Fill(1.); summaryReportMap = dbe->book2D("reportSummaryMap","DT Report Summary Map",12,1,13,5,-2,3); summaryReportMap->setAxisTitle("sector",1); summaryReportMap->setAxisTitle("wheel",2); dbe->setCurrentFolder("DT/EventInfo/reportSummaryContents"); for(int wheel = -2; wheel != 3; ++wheel) { stringstream streams; streams << "DT_Wheel" << wheel; string meName = streams.str(); theSummaryContents.push_back(dbe->bookFloat(meName)); // Initialize to 1 so that no alarms are thrown at the beginning of the run theSummaryContents[wheel+2]->Fill(1.); } }
void DTOfflineSummaryClients::endJob | ( | void | ) | [virtual] |
EndJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 74 of file DTOfflineSummaryClients.cc.
{ LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: endJob"; }
void DTOfflineSummaryClients::endLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | c | ||
) | [virtual] |
EndLumi.
Reimplemented from edm::EDAnalyzer.
Definition at line 93 of file DTOfflineSummaryClients.cc.
{ LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients]: End of LS transition" << endl; }
void DTOfflineSummaryClients::endRun | ( | edm::Run const & | run, |
edm::EventSetup const & | eSetup | ||
) | [virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 101 of file DTOfflineSummaryClients.cc.
References dbe, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getBinContent(), MonitorElement::getBinError(), MonitorElement::getFloatValue(), cuy::ii, LogTrace, funct::pow(), MonitorElement::Reset(), relativeConstraints::station, summaryReport, summaryReportMap, and theSummaryContents.
{ LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: endRun. Performin client operation"; // reset the monitor elements summaryReportMap->Reset(); summaryReport->Fill(0.); for(int ii = 0; ii != 5; ++ii) { theSummaryContents[ii]->Fill(0.); } // Fill the map using, at the moment, only the information from DT chamber efficiency // problems at a granularity smaller than the chamber are ignored for(int wheel=-2; wheel<=2; wheel++) { // loop over wheels // retrieve the chamber efficiency summary stringstream str; str << "DT/05-ChamberEff/EfficiencyMap_All_W" << wheel; MonitorElement * segmentWheelSummary = dbe->get(str.str()); if(segmentWheelSummary != 0) { float nFailingChambers = 0.; for(int sector=1; sector<=12; sector++) { // loop over sectors double meaneff = 0.; double errorsum = 0.; for(int station = 1; station != 5; ++station) { // loop over stations const double tmpefficiency = segmentWheelSummary->getBinContent(sector, station); const double tmpvariance = pow(segmentWheelSummary->getBinError(sector, station),2); if(tmpefficiency == 0 || tmpvariance == 0){ nFailingChambers++; continue; } meaneff += tmpefficiency/tmpvariance; errorsum += 1./tmpvariance; if(tmpefficiency < 0.2) nFailingChambers++; LogTrace("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "Wheel: " << wheel << " Stat: " << station << " Sect: " << sector << " status: " << meaneff/errorsum << endl; } const double eff_result = meaneff/errorsum; if(eff_result > 0.7) summaryReportMap->Fill(sector,wheel,1.); else if(eff_result < 0.7 && eff_result > 0.5) summaryReportMap->Fill(sector,wheel,0.6); else if(eff_result < 0.5 && eff_result > 0.3) summaryReportMap->Fill(sector,wheel,0.4); else if(eff_result < 0.3 && eff_result > 0.) summaryReportMap->Fill(sector,wheel,0.15); } theSummaryContents[wheel+2]->Fill((48.-nFailingChambers)/48.); summaryReport->Fill(summaryReport->getFloatValue() + theSummaryContents[wheel+2]->getFloatValue()/5.); } else { LogWarning("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << " [DTOfflineSummaryClients] Segment Summary not found with name: " << str.str() << endl; } } }
DQMStore* DTOfflineSummaryClients::dbe [private] |
Definition at line 54 of file DTOfflineSummaryClients.h.
Referenced by beginRun(), DTOfflineSummaryClients(), and endRun().
int DTOfflineSummaryClients::nevents [private] |
Definition at line 53 of file DTOfflineSummaryClients.h.
Referenced by analyze(), and ~DTOfflineSummaryClients().
Definition at line 56 of file DTOfflineSummaryClients.h.
Referenced by beginRun(), and endRun().
Definition at line 57 of file DTOfflineSummaryClients.h.
Referenced by beginRun(), and endRun().
std::vector<MonitorElement*> DTOfflineSummaryClients::theSummaryContents [private] |
Definition at line 58 of file DTOfflineSummaryClients.h.
Referenced by beginRun(), and endRun().