CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/EcalBarrelMonitorClient/src/CertificationClient.cc

Go to the documentation of this file.
00001 #include "../interface/CertificationClient.h"
00002 
00003 #include "DQM/EcalBarrelMonitorTasks/interface/IntegrityTask.h"
00004 #include "DQM/EcalBarrelMonitorTasks/interface/RawDataTask.h"
00005 #include "DQM/EcalBarrelMonitorTasks/interface/TowerStatusTask.h"
00006 #include "DQM/EcalBarrelMonitorClient/interface/SummaryClient.h"
00007 
00008 #include "DQMServices/Core/interface/MonitorElement.h"
00009 #include "DQM/EcalCommon/interface/EcalDQMCommonUtils.h"
00010 
00011 namespace ecaldqm {
00012 
00013   CertificationClient::CertificationClient(const edm::ParameterSet& _params, const edm::ParameterSet& _paths) :
00014     DQWorkerClient(_params, _paths, "CertificationClient")
00015   {
00016     edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources"));
00017     source_(sIntegrity, "IntegrityTask", IntegrityTask::kByLumi, sources);
00018     source_(sFEStatus, "RawDataTask", RawDataTask::kFEStatus, sources);
00019     source_(sDesync, "RawDataTask", RawDataTask::kDesyncByLumi, sources);
00020     source_(sDAQ, "TowerStatusTask", TowerStatusTask::kDAQSummaryMap, sources);
00021     source_(sDCS, "TowerStatusTask", TowerStatusTask::kDCSSummaryMap, sources);
00022   }
00023 
00024   void
00025   CertificationClient::bookMEs()
00026   {
00027     unsigned iMEs[] = {kCertificationMap, kCertificationContents, kCertification};
00028     for(unsigned iME(0); iME < sizeof(iMEs) / sizeof(unsigned); iME++)
00029       MEs_[iMEs[iME]]->book();
00030 
00031     MEs_[kReportSummaryMap]->retrieve();
00032     MEs_[kReportSummaryContents]->retrieve();
00033     MEs_[kReportSummary]->retrieve();
00034   }
00035 
00036   void
00037   CertificationClient::beginRun(const edm::Run &, const edm::EventSetup &)
00038   {
00039     MEs_[kCertificationMap]->resetAll(-1.);
00040     MEs_[kCertificationMap]->reset(1.);
00041     MEs_[kCertificationContents]->reset(1.);
00042     MEs_[kCertification]->reset(1.);
00043   }
00044 
00045   void
00046   CertificationClient::producePlots()
00047   {
00048     MEs_[kCertificationMap]->reset(1.);
00049     for(unsigned dccid(1); dccid <= 54; dccid++)
00050       MEs_[kCertificationContents]->fill(dccid, 1.);
00051 
00052     float cert(1.);
00053     MEs_[kCertification]->fill(cert);
00054   }
00055 
00056   /*static*/
00057   void
00058   CertificationClient::setMEData(std::vector<MEData>& _data)
00059   {
00060     _data[kCertificationMap] = MEData("CertificationMap", BinService::kEcal, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F);
00061     _data[kCertificationContents] = MEData("CertificationContents", BinService::kSM, BinService::kReport, MonitorElement::DQM_KIND_REAL);
00062     _data[kCertification] = MEData("Certification", BinService::kEcal, BinService::kReport, MonitorElement::DQM_KIND_REAL);
00063     _data[kReportSummaryMap] = MEData("ReportSummaryMap", BinService::kEcal, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F);
00064     _data[kReportSummaryContents] = MEData("ReportSummaryContents", BinService::kSM, BinService::kReport, MonitorElement::DQM_KIND_REAL);
00065     _data[kReportSummary] = MEData("ReportSummary", BinService::kEcal, BinService::kReport, MonitorElement::DQM_KIND_REAL);
00066   }
00067 
00068   DEFINE_ECALDQM_WORKER(CertificationClient);
00069 }
00070