CMS 3D CMS Logo

DTOfflineSummaryClients Class Reference

* DQM Client for global summary More...

#include <DQM/DTMonitorClient/src/DTOfflineSummaryClients.h>

Inheritance diagram for DTOfflineSummaryClients:

edm::EDAnalyzer

List of all members.

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)
 DQM Client Diagnostic.
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 EndRun.
virtual ~DTOfflineSummaryClients ()
 Destructor.

Private Attributes

DQMStoredbe
int nevents
MonitorElementsummaryReport
MonitorElementsummaryReportMap
std::vector< MonitorElement * > theSummaryContents


Detailed Description

* DQM Client for global summary

Date
2008/11/24 09:24:21
Revision
1.2
Author:
G. Mila - INFN Torino

Definition at line 23 of file DTOfflineSummaryClients.h.


Constructor & Destructor Documentation

DTOfflineSummaryClients::DTOfflineSummaryClients ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 30 of file DTOfflineSummaryClients.cc.

References dbe.

00030                                                                        : nevents(0) {
00031 
00032   LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients]: Constructor";
00033   
00034   
00035   dbe = Service<DQMStore>().operator->();
00036 
00037 }

DTOfflineSummaryClients::~DTOfflineSummaryClients (  )  [virtual]

Destructor.

Definition at line 39 of file DTOfflineSummaryClients.cc.

References nevents.

00039                                                  {
00040   LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "DTOfflineSummaryClients: analyzed " << nevents << " events";
00041   
00042 }


Member Function Documentation

void DTOfflineSummaryClients::analyze ( const edm::Event e,
const edm::EventSetup c 
) [virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 89 of file DTOfflineSummaryClients.cc.

References lat::endl(), and nevents.

00089                                                                                   {
00090 
00091    nevents++;
00092    if(nevents%1000 == 0) {
00093      LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients] Analyze #Run: " << event.id().run()
00094                                          << " #Event: " << event.id().event()
00095                                          << " LS: " << event.luminosityBlock()  
00096                                          << endl;
00097    }
00098 }

void DTOfflineSummaryClients::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
) [virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 44 of file DTOfflineSummaryClients.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), dbe, MonitorElement::Fill(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), summaryReport, summaryReportMap, theSummaryContents, and muonGeometry::wheel.

00044                                                                                {
00045 
00046   LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: BeginRun"; 
00047 
00048   // book the summary histos
00049   dbe->setCurrentFolder("DT/EventInfo"); 
00050   summaryReport = dbe->bookFloat("reportSummary");
00051   // Initialize to 1 so that no alarms are thrown at the beginning of the run
00052   summaryReport->Fill(1.);
00053 
00054   summaryReportMap = dbe->book2D("reportSummaryMap","DT Report Summary Map",12,1,13,5,-2,3);
00055   summaryReportMap->setAxisTitle("sector",1);
00056   summaryReportMap->setAxisTitle("wheel",2);
00057 
00058   dbe->setCurrentFolder("DT/EventInfo/reportSummaryContents");
00059 
00060   for(int wheel = -2; wheel != 3; ++wheel) {
00061     stringstream streams;
00062     streams << "DT_Wheel" << wheel;
00063     string meName = streams.str();    
00064     theSummaryContents.push_back(dbe->bookFloat(meName));
00065     // Initialize to 1 so that no alarms are thrown at the beginning of the run
00066     theSummaryContents[wheel+2]->Fill(1.);
00067   }
00068 
00069 
00070 
00071 
00072 }

void DTOfflineSummaryClients::endJob ( void   )  [virtual]

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 75 of file DTOfflineSummaryClients.cc.

00075                                         {
00076   
00077   LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: endJob"; 
00078 
00079 }

void DTOfflineSummaryClients::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
) [virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file DTOfflineSummaryClients.cc.

References dbe, lat::endl(), MonitorElement::Fill(), DQMStore::get(), MonitorElement::getBinContent(), LogTrace, MonitorElement::Reset(), summaryReport, summaryReportMap, theSummaryContents, and muonGeometry::wheel.

00101                                                                                                           {
00102   
00103   LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
00104     << "[DTOfflineSummaryClients]: End of LS transition, performing the DQM client operation" << endl;
00105 
00106   // reset the monitor elements
00107   summaryReportMap->Reset();
00108   summaryReport->Reset();
00109   for(int ii = 0; ii != 5; ++ii) {
00110     theSummaryContents[ii]->Reset();
00111   }
00112 
00113 //   bool noDTData = false;
00114 
00115   // Check if DT data in each ROS have been read out and set the SummaryContents and the ErrorSummary
00116   // accordignly
00117   /*MonitorElement * dataIntegritySummary = dbe->get("DT/00-DataIntegrity/DataIntegritySummary");
00118   if(dataIntegritySummary != 0) {
00119   int nDisabledFED = 0;
00120   for(int wheel = 1; wheel != 6; ++wheel) { // loop over the wheels
00121     int nDisablesROS = 0;
00122     for(int sect = 1; sect != 13; ++sect) { // loop over sectors
00123       if(dataIntegritySummary->getBinContent(sect,wheel) == 1) {
00124         nDisablesROS++;
00125       }
00126     }
00127     if(nDisablesROS == 12) {
00128       nDisabledFED++;
00129       theSummaryContents[wheel-1]->Fill(0);
00130     }
00131   }
00132   
00133   if(nDisabledFED == 5) {
00134     noDTData = true;
00135     summaryReport->Fill(-1);
00136   }
00137   
00138   } else {
00139     LogError("DTDQM|DTMonitorClient|DTSummaryClients")
00140       << "Data Integrity Summary not found with name: DT/00-DataIntegrity/DataIntegritySummary" <<endl;
00141       }*/
00142 
00143   double totalStatus = 0;
00144   // protection 
00145   bool efficiencyFound = true;
00146 
00147   // Fill the map using, at the moment, only the information from DT chamber efficiency
00148   // problems at a granularity smaller than the chamber are ignored
00149   for(int wheel=-2; wheel<=2; wheel++) { // loop over wheels
00150     // retrieve the chamber efficiency summary
00151     stringstream str;
00152     str << "DT/02-Segments/segmentSummary_W" << wheel;
00153     MonitorElement * segmentWheelSummary =  dbe->get(str.str());
00154     if(segmentWheelSummary != 0) {
00155       int nFailingChambers = 0;
00156       for(int sector=1; sector<=12; sector++) { // loop over sectors
00157         for(int station = 1; station != 5; ++station) { // loop over stations
00158           double chamberStatus = segmentWheelSummary->getBinContent(sector, station);
00159           LogTrace("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
00160             << "Wheel: " << wheel << " Stat: " << station << " Sect: " << sector << " status: " << chamberStatus << endl;
00161           if(chamberStatus == 0 || chamberStatus == 1) {
00162             summaryReportMap->Fill(sector, wheel, 0.25);
00163           } else {
00164             nFailingChambers++;
00165           }
00166           LogTrace("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << " sector (" << sector << ") status on the map is: "
00167                                                              << summaryReportMap->getBinContent(sector, wheel+3) << endl;
00168         }
00169 
00170       }
00171       theSummaryContents[wheel+2]->Fill((48.-nFailingChambers)/48.);
00172       totalStatus += (48.-nFailingChambers)/48.;
00173     } else {
00174       efficiencyFound = false;
00175       LogWarning("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
00176         << " [DTOfflineSummaryClients] Segment Summary not found with name: " << str.str() << endl;
00177     }
00178   }
00179 
00180 
00181   //if(efficiencyFound && !noDTData)
00182 //   if(efficiencyFound)
00183 //     summaryReport->Fill(totalStatus/5.);
00184 
00185 //   cout << "-----------------------------------------------------------------------------" << endl;
00186 //   cout << " In the endLuminosityBlock: " << endl;
00187 //   for(int wheel = -2; wheel != 3; ++wheel) {
00188 //     for(int sector = 1; sector != 13; sector++) {
00189 //       cout << " wheel: " << wheel << " sector: " << sector << " status on the map is: "
00190 //         << summaryReportMap->getBinContent(sector, wheel+3) << endl;
00191 //     }
00192 //   }
00193 //   cout << "-----------------------------------------------------------------------------" << endl;
00194 
00195 
00196 }

void DTOfflineSummaryClients::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
) [virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file DTOfflineSummaryClients.cc.

00082                                                                              {
00083   
00084   LogVerbatim ("DTDQM|DTMonitorClient|DTOfflineSummaryClients") <<"[DTOfflineSummaryClients]: endRun"; 
00085 
00086 }


Member Data Documentation

DQMStore* DTOfflineSummaryClients::dbe [private]

Definition at line 54 of file DTOfflineSummaryClients.h.

Referenced by beginRun(), DTOfflineSummaryClients(), and endLuminosityBlock().

int DTOfflineSummaryClients::nevents [private]

Definition at line 53 of file DTOfflineSummaryClients.h.

Referenced by analyze(), and ~DTOfflineSummaryClients().

MonitorElement* DTOfflineSummaryClients::summaryReport [private]

Definition at line 56 of file DTOfflineSummaryClients.h.

Referenced by beginRun(), and endLuminosityBlock().

MonitorElement* DTOfflineSummaryClients::summaryReportMap [private]

Definition at line 57 of file DTOfflineSummaryClients.h.

Referenced by beginRun(), and endLuminosityBlock().

std::vector<MonitorElement*> DTOfflineSummaryClients::theSummaryContents [private]

Definition at line 58 of file DTOfflineSummaryClients.h.

Referenced by beginRun(), and endLuminosityBlock().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:58 2009 for CMSSW by  doxygen 1.5.4