Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:44

0001 /****************************************************************************
0002 * Author:
0003 *  Grzegorz Sroka
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/PPSAssociationCuts.h"
0018 #include "CondFormats/DataRecord/interface/PPSAssociationCutsRcd.h"
0019 
0020 #include <memory>
0021 
0022 class RetrievePPSAssociationCuts : public edm::one::EDAnalyzer<> {
0023 public:
0024   explicit RetrievePPSAssociationCuts(const edm::ParameterSet &);
0025 
0026 private:
0027   void analyze(const edm::Event &, const edm::EventSetup &) override;
0028 
0029   edm::ESGetToken<PPSAssociationCuts, PPSAssociationCutsRcd> esToken_;
0030 };
0031 
0032 RetrievePPSAssociationCuts::RetrievePPSAssociationCuts(const edm::ParameterSet &iConfig) : esToken_(esConsumes()) {}
0033 
0034 void RetrievePPSAssociationCuts::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
0035   // get the data
0036   const auto &ppsAssociationCuts = iSetup.getData(esToken_);
0037 
0038   edm::LogInfo("PPS") << ppsAssociationCuts;
0039 }
0040 
0041 //define this as a plug-in
0042 DEFINE_FWK_MODULE(RetrievePPSAssociationCuts);