Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:10:03

0001 #include <iostream>
0002 
0003 #include "FWCore/ServiceRegistry/interface/Service.h"
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include "FWCore/Framework/interface/MakerMacros.h"
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 
0008 #include "FWCore/Framework/interface/ESHandle.h"
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 
0011 #include "DataFormats/EcalDetId/interface/ESDetId.h"
0012 
0013 #include "CondFormats/DataRecord/interface/RunSummaryRcd.h"
0014 #include "CondFormats/RunInfo/interface/RunSummary.h"
0015 #include "CondFormats/RunInfo/interface/RunInfo.h"
0016 
0017 #include "DQMServices/Core/interface/DQMStore.h"
0018 
0019 #include "DQM/EcalPreshowerMonitorModule/interface/ESDataCertificationTask.h"
0020 
0021 using namespace cms;
0022 using namespace edm;
0023 using namespace std;
0024 
0025 ESDataCertificationTask::ESDataCertificationTask(const ParameterSet& ps) {
0026   dqmStore_ = Service<DQMStore>().operator->();
0027 
0028   prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
0029 
0030   mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
0031 
0032   meESDataCertificationSummary_ = nullptr;
0033   meESDataCertificationSummaryMap_ = nullptr;
0034 }
0035 
0036 ESDataCertificationTask::~ESDataCertificationTask() {}
0037 
0038 void ESDataCertificationTask::beginJob(void) {
0039   char histo[200];
0040 
0041   if (dqmStore_) {
0042     dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo");
0043 
0044     sprintf(histo, "CertificationSummary");
0045     meESDataCertificationSummary_ = dqmStore_->bookFloat(histo);
0046     meESDataCertificationSummary_->Fill(0.0);
0047 
0048     sprintf(histo, "CertificationSummaryMap");
0049     meESDataCertificationSummaryMap_ = dqmStore_->book2D(histo, histo, 40, 0., 40., 40, 0., 40.);
0050     meESDataCertificationSummaryMap_->setAxisTitle("X", 1);
0051     meESDataCertificationSummaryMap_->setAxisTitle("Y", 2);
0052   }
0053 }
0054 
0055 void ESDataCertificationTask::endJob(void) {}
0056 
0057 void ESDataCertificationTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock,
0058                                                    const edm::EventSetup& iSetup) {
0059   this->reset();
0060 }
0061 
0062 void ESDataCertificationTask::reset(void) {
0063   if (meESDataCertificationSummary_)
0064     meESDataCertificationSummary_->Reset();
0065 
0066   if (meESDataCertificationSummaryMap_)
0067     meESDataCertificationSummaryMap_->Reset();
0068 }
0069 
0070 void ESDataCertificationTask::analyze(const Event& e, const EventSetup& c) {}
0071 
0072 DEFINE_FWK_MODULE(ESDataCertificationTask);