CMS 3D CMS Logo

L1TMuonOverlapParamsDBProducer.cc
Go to the documentation of this file.
3 
5 
8 
11 
16  const L1TMuonOverlapParamsRcd& omtfParamsRcd = iSetup.get<L1TMuonOverlapParamsRcd>();
17 
18  edm::ESHandle<L1TMuonOverlapParams> omtfParamsHandle;
19 
20  omtfParamsRcd.get("params", omtfParamsHandle);
21 
22  omtfParams = std::unique_ptr<L1TMuonOverlapParams>(new L1TMuonOverlapParams(*omtfParamsHandle.product()));
23  if (!omtfParams) {
24  edm::LogError("L1TMuonOverlapTrackProducer") << "Could not retrieve parameters from Event Setup" << std::endl;
25  }
26 }
30  std::string recordName = "L1TMuonOverlapParamsRcd";
32  if (poolDbService.isAvailable()) {
33  poolDbService->writeOne(omtfParams.get(), poolDbService->currentTime(), recordName);
34  }
35 }
bool ev
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool isAvailable() const
Definition: Service.h:40
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
void analyze(const edm::Event &, const edm::EventSetup &es) override
std::unique_ptr< L1TMuonOverlapParams > omtfParams
T get() const
Definition: EventSetup.h:73
void beginRun(const edm::Run &, const edm::EventSetup &es) override
Definition: Run.h:45
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)