Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:43:37

0001 // -*- C++ -*-
0002 //
0003 // Package:     SiStripMonitorSummary
0004 // Class  :     SiStripMonitorCondData
0005 //
0006 // Original Author:  Evelyne Delmeire
0007 //
0008 
0009 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0010 #include "FWCore/Framework/interface/ESHandle.h"
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 
0015 #include "DQM/SiStripMonitorSummary/interface/SiStripClassToMonitorCondData.h"
0016 
0017 class SiStripMonitorCondData : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0018 public:
0019   explicit SiStripMonitorCondData(const edm::ParameterSet &);
0020 
0021   ~SiStripMonitorCondData() override = default;
0022 
0023   void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override;
0024   void analyze(const edm::Event &, const edm::EventSetup &) override;
0025   void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override;
0026 
0027 private:
0028   SiStripClassToMonitorCondData moni_;
0029 };
0030 
0031 SiStripMonitorCondData::SiStripMonitorCondData(edm::ParameterSet const &iConfig)
0032     : moni_(iConfig, consumesCollector()) {}
0033 
0034 void SiStripMonitorCondData::beginRun(edm::Run const &run, edm::EventSetup const &eSetup) {
0035   moni_.beginRun(run.run(), eSetup);
0036 }
0037 
0038 void SiStripMonitorCondData::analyze(edm::Event const &iEvent, edm::EventSetup const &eSetup) {
0039   moni_.analyseCondData(eSetup);
0040 }
0041 
0042 void SiStripMonitorCondData::endRun(edm::Run const &run, edm::EventSetup const &eSetup) {
0043   moni_.end();
0044   moni_.save();
0045 }
0046 
0047 #include "FWCore/Framework/interface/MakerMacros.h"
0048 DEFINE_FWK_MODULE(SiStripMonitorCondData);