Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:15

0001 // -*- C++ -*-
0002 //
0003 // Package:    L1RPCBxOrConfigOnlineProd
0004 // Class:      L1RPCBxOrConfigOnlineProd
0005 //
0006 /**\class L1RPCBxOrConfigOnlineProd L1RPCBxOrConfigOnlineProd.h L1Trigger/RPCConfigProducers/src/RPCBxOrConfigOnlineProd.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 
0014 // system include files
0015 
0016 // user include files
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018 
0019 #include "CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h"
0020 
0021 #include "CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h"
0022 #include "CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h"
0023 
0024 //
0025 // class declaration
0026 //
0027 
0028 class L1RPCBxOrConfigOnlineProd : public L1ConfigOnlineProdBase<L1RPCBxOrConfigRcd, L1RPCBxOrConfig> {
0029 public:
0030   L1RPCBxOrConfigOnlineProd(const edm::ParameterSet&);
0031   ~L1RPCBxOrConfigOnlineProd() override;
0032 
0033   std::unique_ptr<L1RPCBxOrConfig> newObject(const std::string& objectKey) override;
0034 
0035 private:
0036   // ----------member data ---------------------------
0037 };
0038 
0039 //
0040 // constants, enums and typedefs
0041 //
0042 
0043 //
0044 // static data member definitions
0045 //
0046 
0047 //
0048 // constructors and destructor
0049 //
0050 L1RPCBxOrConfigOnlineProd::L1RPCBxOrConfigOnlineProd(const edm::ParameterSet& iConfig)
0051     : L1ConfigOnlineProdBase<L1RPCBxOrConfigRcd, L1RPCBxOrConfig>(iConfig) {
0052   //the following line is needed to tell the framework what
0053   // data is being produced
0054 
0055   //now do what ever other initialization is needed
0056 }
0057 
0058 L1RPCBxOrConfigOnlineProd::~L1RPCBxOrConfigOnlineProd() {
0059   // do anything here that needs to be done at desctruction time
0060   // (e.g. close files, deallocate resources etc.)
0061 }
0062 
0063 std::unique_ptr<L1RPCBxOrConfig> L1RPCBxOrConfigOnlineProd::newObject(const std::string& objectKey) {
0064   edm::LogError("L1-O2O") << "L1RPCBxOrConfig object with key " << objectKey << " not in ORCON!";
0065   auto pBxOrConfig = std::make_unique<L1RPCBxOrConfig>();
0066   pBxOrConfig->setFirstBX(0);
0067   pBxOrConfig->setLastBX(0);
0068   return pBxOrConfig;
0069 }
0070 
0071 //
0072 // member functions
0073 //
0074 
0075 // ------------ method called to produce the data  ------------
0076 
0077 //define this as a plug-in
0078 DEFINE_FWK_EVENTSETUP_MODULE(L1RPCBxOrConfigOnlineProd);