Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-20 22:54:33

0001 /****************************************************************************

0002 * Author: 

0003 *  Mateusz Kocot (mateuszkocot99@gmail.com)

0004 ****************************************************************************/
0005 
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/Framework/interface/ESHandle.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 
0013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "FWCore/ServiceRegistry/interface/Service.h"
0016 
0017 #include "CondFormats/PPSObjects/interface/CTPPSRPAlignmentCorrectionsData.h"
0018 #include "CondFormats/DataRecord/interface/CTPPSRPAlignmentCorrectionsDataRcd.h"
0019 
0020 #include <memory>
0021 
0022 class RetrieveCTPPSRPAlignmentCorrectionsData : public edm::one::EDAnalyzer<> {
0023 public:
0024   explicit RetrieveCTPPSRPAlignmentCorrectionsData(const edm::ParameterSet &);
0025 
0026 private:
0027   void analyze(const edm::Event &, const edm::EventSetup &) override;
0028 
0029   edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, CTPPSRPAlignmentCorrectionsDataRcd> esToken_;
0030 };
0031 
0032 RetrieveCTPPSRPAlignmentCorrectionsData::RetrieveCTPPSRPAlignmentCorrectionsData(const edm::ParameterSet &iConfig)
0033     : esToken_(esConsumes()) {}
0034 
0035 void RetrieveCTPPSRPAlignmentCorrectionsData::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
0036   // get the data

0037   const auto &ctppsRPAlignmentCorrectionsData = iSetup.getData(esToken_);
0038 
0039   edm::LogInfo("PPS") << ctppsRPAlignmentCorrectionsData;
0040 }
0041 
0042 //define this as a plug-in

0043 DEFINE_FWK_MODULE(RetrieveCTPPSRPAlignmentCorrectionsData);