CMS 3D CMS Logo

L1TMuonOverlapParamsDBProducer.cc
Go to the documentation of this file.
3 
5 
6 #include <memory>
7 
10 
13 
18  const L1TMuonOverlapParamsRcd& omtfParamsRcd = iSetup.get<L1TMuonOverlapParamsRcd>();
19 
20  edm::ESHandle<L1TMuonOverlapParams> omtfParamsHandle;
21 
22  omtfParamsRcd.get("params", omtfParamsHandle);
23 
24  omtfParams = std::make_unique<L1TMuonOverlapParams>(*omtfParamsHandle.product());
25  if (!omtfParams) {
26  edm::LogError("L1TMuonOverlapTrackProducer") << "Could not retrieve parameters from Event Setup" << std::endl;
27  }
28 }
32  std::string recordName = "L1TMuonOverlapParamsRcd";
34  if (poolDbService.isAvailable()) {
35  poolDbService->writeOneIOV(*omtfParams, poolDbService->currentTime(), recordName);
36  }
37 }
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Error, false > LogError
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
T get() const
Definition: EventSetup.h:82
void analyze(const edm::Event &, const edm::EventSetup &es) override
std::unique_ptr< L1TMuonOverlapParams > omtfParams
void beginRun(const edm::Run &, const edm::EventSetup &es) override
bool isAvailable() const
Definition: Service.h:40
Definition: Run.h:45
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)