CMS 3D CMS Logo

L1MuonOverlapPhase1ParamsDBProducer.cc
Go to the documentation of this file.
2 
8 #include <memory>
9 
11  : omtfParamsEsToken(esConsumes<L1TMuonOverlapParams, L1TMuonOverlapParamsRcd, edm::Transition::BeginRun>()) {
12  edm::LogVerbatim("L1MuonOverlapParamsDBProducer") << " L1MuonOverlapPhase1ParamsDBProducer() " << std::endl;
13 }
17  omtfParams = std::make_unique<L1TMuonOverlapParams>(iSetup.getData(omtfParamsEsToken));
18 
19  if (!omtfParams) {
20  edm::LogError("L1MuonOverlapParamsDBProducer") << "Could not retrieve parameters from Event Setup" << std::endl;
21  }
22 
23  edm::LogVerbatim("L1MuonOverlapParamsDBProducer") << " beginRun() " << std::endl;
24 }
27 
29  edm::LogVerbatim("L1MuonOverlapParamsDBProducer") << " analyze() line " << __LINE__ << std::endl;
30  std::string recordName = "L1TMuonOverlapParamsRcd";
32  if (poolDbService.isAvailable()) {
33  poolDbService->writeOneIOV(*omtfParams, poolDbService->currentTime(), recordName);
34  }
35  edm::LogVerbatim("L1MuonOverlapParamsDBProducer") << " analyze() line " << __LINE__ << std::endl;
36 }
Log< level::Info, true > LogVerbatim
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void beginRun(const edm::Run &, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::unique_ptr< L1TMuonOverlapParams > omtfParams
Log< level::Error, false > LogError
edm::ESGetToken< L1TMuonOverlapParams, L1TMuonOverlapParamsRcd > omtfParamsEsToken
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
Transition
Definition: Transition.h:12
bool getData(T &iHolder) const
Definition: EventSetup.h:122
void analyze(const edm::Event &, const edm::EventSetup &es) override
HLT enums.
L1MuonOverlapPhase1ParamsDBProducer(const edm::ParameterSet &cfg)
bool isAvailable() const
Definition: Service.h:40
Definition: Run.h:45