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 #include "FWCore/Framework/interface/ESHandle.h"
0007 #include "CondFormats/L1TObjects/interface/L1TMuonEndCapForest.h"
0008 #include "CondFormats/DataRecord/interface/L1TMuonEndCapForestRcd.h"
0009 #include "CondFormats/DataRecord/interface/L1TMuonEndCapForestO2ORcd.h"
0010
0011 class L1TMuonEndCapForestOnlineProxy : public edm::ESProducer {
0012 private:
0013 const edm::ESGetToken<L1TMuonEndCapForest, L1TMuonEndCapForestRcd> baseSettings_token;
0014
0015 public:
0016 std::unique_ptr<L1TMuonEndCapForest> produce(const L1TMuonEndCapForestO2ORcd& record);
0017
0018 L1TMuonEndCapForestOnlineProxy(const edm::ParameterSet&);
0019 ~L1TMuonEndCapForestOnlineProxy(void) override {}
0020 };
0021
0022 L1TMuonEndCapForestOnlineProxy::L1TMuonEndCapForestOnlineProxy(const edm::ParameterSet& iConfig)
0023 : baseSettings_token(setWhatProduced(this).consumes()) {}
0024
0025 std::unique_ptr<L1TMuonEndCapForest> L1TMuonEndCapForestOnlineProxy::produce(const L1TMuonEndCapForestO2ORcd& record) {
0026 const L1TMuonEndCapForestRcd& baseRcd = record.template getRecord<L1TMuonEndCapForestRcd>();
0027 auto const& baseSettings = baseRcd.get(baseSettings_token);
0028
0029 return std::make_unique<L1TMuonEndCapForest>(baseSettings);
0030 }
0031
0032
0033 DEFINE_FWK_EVENTSETUP_MODULE(L1TMuonEndCapForestOnlineProxy);