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 }
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:71
void beginRun(const edm::Run &, const edm::EventSetup &es) override
Definition: Run.h:45
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)