Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:25

0001 // -*- C++ -*-
0002 //
0003 // Package:    DumpL1RPCBxOrConfig
0004 // Class:      DumpL1RPCBxOrConfig
0005 //
0006 /**\class DumpL1RPCBxOrConfig DumpL1RPCBxOrConfig.cc L1TriggerConfig/DumpL1RPCBxOrConfig/src/DumpL1RPCBxOrConfig.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 
0014 // system include files
0015 #include <memory>
0016 #include "CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h"
0017 #include "CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h"
0018 // user include files
0019 #include "FWCore/Framework/interface/Frameworkfwd.h"
0020 #include "FWCore/Framework/interface/global/EDAnalyzer.h"
0021 
0022 #include "FWCore/Framework/interface/Event.h"
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024 
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 
0027 #include "FWCore/Framework/interface/EventSetup.h"
0028 #include "FWCore/Framework/interface/ESHandle.h"
0029 
0030 #include <fstream>
0031 
0032 //
0033 // class decleration
0034 //
0035 
0036 class DumpL1RPCBxOrConfig : public edm::global::EDAnalyzer<> {
0037 public:
0038   explicit DumpL1RPCBxOrConfig(const edm::ParameterSet&);
0039 
0040 private:
0041   void analyze(edm::StreamID, const edm::Event&, const edm::EventSetup&) const override;
0042 
0043   // ----------member data ---------------------------
0044   edm::ESGetToken<L1RPCBxOrConfig, L1RPCBxOrConfigRcd> getToken_;
0045 };
0046 
0047 //
0048 // constants, enums and typedefs
0049 //
0050 
0051 //
0052 // static data member definitions
0053 //
0054 
0055 //
0056 // constructors and destructor
0057 //
0058 DumpL1RPCBxOrConfig::DumpL1RPCBxOrConfig(const edm::ParameterSet& iConfig)
0059     : getToken_(esConsumes())
0060 
0061 {
0062   //now do what ever initialization is needed
0063 }
0064 
0065 //
0066 // member functions
0067 //
0068 
0069 // ------------ method called to for each event  ------------
0070 void DumpL1RPCBxOrConfig::analyze(edm::StreamID, const edm::Event& iEvent, const edm::EventSetup& iSetup) const {
0071   using namespace edm;
0072 
0073   L1RPCBxOrConfig const& bxOrConfig = iSetup.getData(getToken_);
0074 
0075   LogTrace("DumpL1RPCBxOrConfig") << std::endl;
0076   LogDebug("DumpL1RPCBxOrConfig") << "\n\n Printing L1RPCBxOrConfigRcd record\n" << std::endl;
0077   LogTrace("DumpL1RPCBxOrConfig") << "\nChecking BX Or settings: \n" << std::endl;
0078 
0079   LogTrace("DumpL1RPCBxOrConfig") << "First BX : " << bxOrConfig.getFirstBX()
0080                                   << ", Last BX : " << bxOrConfig.getLastBX() << std::endl;
0081 }
0082 
0083 //define this as a plug-in
0084 DEFINE_FWK_MODULE(DumpL1RPCBxOrConfig);