CMS 3D CMS Logo

L1TMuonOverlapParamsDBProducer.cc
Go to the documentation of this file.
3 
5 
8 
11 
16 
17  const L1TMuonOverlapParamsRcd& omtfParamsRcd = iSetup.get<L1TMuonOverlapParamsRcd>();
18 
19  edm::ESHandle<L1TMuonOverlapParams> omtfParamsHandle;
20 
21  omtfParamsRcd.get("params",omtfParamsHandle);
22 
23  omtfParams = std::unique_ptr<L1TMuonOverlapParams>(new L1TMuonOverlapParams(*omtfParamsHandle.product()));
24  if (!omtfParams) {
25  edm::LogError("L1TMuonOverlapTrackProducer") << "Could not retrieve parameters from Event Setup" << std::endl;
26  }
27 }
31 
32  std::string recordName = "L1TMuonOverlapParamsRcd";
34  if(poolDbService.isAvailable()){
35  poolDbService->writeOne(omtfParams.get(), poolDbService->currentTime(),recordName);
36  }
37 }
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool ev
void get(HolderT &iHolder) const
bool isAvailable() const
Definition: Service.h:46
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
const T & get() const
Definition: EventSetup.h:59
void beginRun(const edm::Run &, const edm::EventSetup &es) override
Definition: Run.h:43
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)