File indexing completed on 2024-04-06 12:22:24
0001 #include <iostream>
0002 #include <fstream>
0003
0004 #include "FWCore/Framework/interface/ModuleFactory.h"
0005 #include "FWCore/Framework/interface/ESProducer.h"
0006
0007 #include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
0008 #include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h"
0009 #include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsO2ORcd.h"
0010
0011 class L1TMuonOverlapParamsOnlineProxy : public edm::ESProducer {
0012 private:
0013 const edm::ESGetToken<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd> baseSettings_token;
0014
0015 public:
0016 std::unique_ptr<L1TMuonOverlapParams> produce(const L1TMuonOverlapParamsO2ORcd& record);
0017
0018 L1TMuonOverlapParamsOnlineProxy(const edm::ParameterSet&);
0019 ~L1TMuonOverlapParamsOnlineProxy(void) override {}
0020 };
0021
0022 L1TMuonOverlapParamsOnlineProxy::L1TMuonOverlapParamsOnlineProxy(const edm::ParameterSet& iConfig)
0023 : baseSettings_token(setWhatProduced(this).consumes()) {}
0024
0025 std::unique_ptr<L1TMuonOverlapParams> L1TMuonOverlapParamsOnlineProxy::produce(
0026 const L1TMuonOverlapParamsO2ORcd& record) {
0027 const L1TMuonOverlapParamsRcd& baseRcd = record.template getRecord<L1TMuonOverlapParamsRcd>();
0028 auto const& baseSettings = baseRcd.get(baseSettings_token);
0029
0030 return std::make_unique<L1TMuonOverlapParams>(baseSettings);
0031 }
0032
0033
0034 DEFINE_FWK_EVENTSETUP_MODULE(L1TMuonOverlapParamsOnlineProxy);