#include <DQM/DTMonitorClient/src/DTSummaryClients.h>
Public Member Functions | |
DTSummaryClients (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~DTSummaryClients () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginRun (edm::Run const &run, edm::EventSetup const &eSetup) |
BeginRun. | |
void | endJob (void) |
EndJob. | |
void | endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) |
DQM Client Diagnostic. | |
void | endRun (edm::Run const &run, edm::EventSetup const &eSetup) |
EndRun. | |
Private Attributes | |
DQMStore * | dbe |
int | nevents |
MonitorElement * | summaryReport |
MonitorElement * | summaryReportMap |
std::vector< MonitorElement * > | theSummaryContents |
Definition at line 33 of file DTSummaryClients.h.
DTSummaryClients::DTSummaryClients | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 29 of file DTSummaryClients.cc.
References dbe.
00029 : nevents(0) { 00030 00031 LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") << "[DTSummaryClients]: Constructor"; 00032 00033 00034 dbe = Service<DQMStore>().operator->(); 00035 00036 }
DTSummaryClients::~DTSummaryClients | ( | ) | [virtual] |
Destructor.
Definition at line 38 of file DTSummaryClients.cc.
References nevents.
00038 { 00039 LogVerbatim ("DTDQM|DTMonitorClient|DTSummaryClients") << "DTSummaryClients: analyzed " << nevents << " events"; 00040 00041 }
void DTSummaryClients::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 88 of file DTSummaryClients.cc.
References lat::endl(), and nevents.
00088 { 00089 00090 nevents++; 00091 if(nevents%1000 == 0) { 00092 LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") << "[DTSummaryClients] Analyze #Run: " << event.id().run() 00093 << " #Event: " << event.id().event() 00094 << " LS: " << event.luminosityBlock() 00095 << endl; 00096 } 00097 }
void DTSummaryClients::beginRun | ( | edm::Run const & | run, | |
edm::EventSetup const & | eSetup | |||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 43 of file DTSummaryClients.cc.
References DQMStore::book2D(), DQMStore::bookFloat(), dbe, MonitorElement::Fill(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), summaryReport, summaryReportMap, theSummaryContents, and muonGeometry::wheel.
00043 { 00044 00045 LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") <<"[DTSummaryClients]: BeginRun"; 00046 00047 // book the summary histos 00048 dbe->setCurrentFolder("DT/EventInfo"); 00049 summaryReport = dbe->bookFloat("reportSummary"); 00050 // Initialize to 1 so that no alarms are thrown at the beginning of the run 00051 summaryReport->Fill(1.); 00052 00053 summaryReportMap = dbe->book2D("reportSummaryMap","DT Report Summary Map",12,1,13,5,-2,3); 00054 summaryReportMap->setAxisTitle("sector",1); 00055 summaryReportMap->setAxisTitle("wheel",2); 00056 00057 dbe->setCurrentFolder("DT/EventInfo/reportSummaryContents"); 00058 00059 for(int wheel = -2; wheel != 3; ++wheel) { 00060 stringstream streams; 00061 streams << "DT_Wheel" << wheel; 00062 string meName = streams.str(); 00063 theSummaryContents.push_back(dbe->bookFloat(meName)); 00064 // Initialize to 1 so that no alarms are thrown at the beginning of the run 00065 theSummaryContents[wheel+2]->Fill(1.); 00066 } 00067 00068 00069 00070 00071 }
EndJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 74 of file DTSummaryClients.cc.
00074 { 00075 00076 LogVerbatim ("DTDQM|DTMonitorClient|DTSummaryClients") <<"[DTSummaryClients]: endJob"; 00077 00078 }
void DTSummaryClients::endLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, | |
edm::EventSetup const & | c | |||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 100 of file DTSummaryClients.cc.
References dbe, lat::endl(), MonitorElement::Fill(), DQMStore::get(), MonitorElement::getBinContent(), LogTrace, MonitorElement::Reset(), summaryReport, summaryReportMap, theSummaryContents, and muonGeometry::wheel.
00100 { 00101 00102 LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") 00103 << "[DTSummaryClients]: End of LS transition, performing the DQM client operation" << endl; 00104 00105 // reset the monitor elements 00106 summaryReportMap->Reset(); 00107 summaryReport->Reset(); 00108 for(int ii = 0; ii != 5; ++ii) { 00109 theSummaryContents[ii]->Reset(); 00110 } 00111 00112 bool noDTData = false; 00113 00114 // Check if DT data in each ROS have been read out and set the SummaryContents and the ErrorSummary 00115 // accordignly 00116 MonitorElement * dataIntegritySummary = dbe->get("DT/00-DataIntegrity/DataIntegritySummary"); 00117 if(dataIntegritySummary != 0) { 00118 int nDisabledFED = 0; 00119 for(int wheel = 1; wheel != 6; ++wheel) { // loop over the wheels 00120 int nDisablesROS = 0; 00121 for(int sect = 1; sect != 13; ++sect) { // loop over sectors 00122 if(dataIntegritySummary->getBinContent(sect,wheel) == 1) { 00123 nDisablesROS++; 00124 } 00125 } 00126 if(nDisablesROS == 12) { 00127 nDisabledFED++; 00128 theSummaryContents[wheel-1]->Fill(0); 00129 } 00130 } 00131 00132 if(nDisabledFED == 5) { 00133 noDTData = true; 00134 summaryReport->Fill(-1); 00135 } 00136 00137 } else { 00138 LogError("DTDQM|DTMonitorClient|DTSummaryClients") 00139 << "Data Integrity Summary not found with name: DT/00-DataIntegrity/DataIntegritySummary" <<endl; 00140 } 00141 00142 double totalStatus = 0; 00143 // protection 00144 bool occupancyFound = true; 00145 00146 // Fill the map using, at the moment, only the information from DT occupancy 00147 // problems at a granularity smaller than the chamber are ignored 00148 for(int wheel=-2; wheel<=2; wheel++){ // loop over wheels 00149 // retrieve the occupancy summary 00150 stringstream str; 00151 str << "DT/01-Digi/OccupancySummary_W" << wheel; 00152 MonitorElement * wheelOccupancySummary = dbe->get(str.str()); 00153 if(wheelOccupancySummary != 0) { 00154 int nFailingChambers = 0; 00155 for(int sector=1; sector<=12; sector++){ // loop over sectors 00156 for(int station = 1; station != 5; ++station) { // loop over stations 00157 double chamberStatus = wheelOccupancySummary->getBinContent(sector, station); 00158 LogTrace("DTDQM|DTMonitorClient|DTSummaryClients") 00159 << "Wheel: " << wheel << " Stat: " << station << " Sect: " << sector << " status: " << chamberStatus << endl; 00160 if(chamberStatus != 4) { 00161 summaryReportMap->Fill(sector, wheel, 0.25); 00162 } else { 00163 nFailingChambers++; 00164 } 00165 LogTrace("DTDQM|DTMonitorClient|DTSummaryClients") << " sector (" << sector << ") status on the map is: " 00166 << summaryReportMap->getBinContent(sector, wheel+3) << endl; 00167 } 00168 00169 } 00170 theSummaryContents[wheel+2]->Fill((48.-nFailingChambers)/48.); 00171 totalStatus += (48.-nFailingChambers)/48.; 00172 } else { 00173 occupancyFound = false; 00174 LogError("DTDQM|DTMonitorClient|DTSummaryClients")<< " Wheel Occupancy Summary not found with name: " << str.str() << endl; 00175 } 00176 } 00177 00178 00179 if(occupancyFound && !noDTData) 00180 summaryReport->Fill(totalStatus/5.); 00181 00182 // cout << "-----------------------------------------------------------------------------" << endl; 00183 // cout << " In the endLuminosityBlock: " << endl; 00184 // for(int wheel = -2; wheel != 3; ++wheel) { 00185 // for(int sector = 1; sector != 13; sector++) { 00186 // cout << " wheel: " << wheel << " sector: " << sector << " status on the map is: " 00187 // << summaryReportMap->getBinContent(sector, wheel+3) << endl; 00188 // } 00189 // } 00190 // cout << "-----------------------------------------------------------------------------" << endl; 00191 00192 00193 }
void DTSummaryClients::endRun | ( | edm::Run const & | run, | |
edm::EventSetup const & | eSetup | |||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 81 of file DTSummaryClients.cc.
00081 { 00082 00083 LogVerbatim ("DTDQM|DTMonitorClient|DTSummaryClients") <<"[DTSummaryClients]: endRun"; 00084 00085 }
DQMStore* DTSummaryClients::dbe [private] |
Definition at line 63 of file DTSummaryClients.h.
Referenced by beginRun(), DTSummaryClients(), and endLuminosityBlock().
int DTSummaryClients::nevents [private] |
MonitorElement* DTSummaryClients::summaryReport [private] |
Definition at line 65 of file DTSummaryClients.h.
Referenced by beginRun(), and endLuminosityBlock().
MonitorElement* DTSummaryClients::summaryReportMap [private] |
Definition at line 66 of file DTSummaryClients.h.
Referenced by beginRun(), and endLuminosityBlock().
std::vector<MonitorElement*> DTSummaryClients::theSummaryContents [private] |
Definition at line 67 of file DTSummaryClients.h.
Referenced by beginRun(), and endLuminosityBlock().