L1Trigger
L1TMuonOverlap
plugins
L1TMuonOverlapParamsDBProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
2
#include "
FWCore/Framework/interface/ESHandle.h
"
3
4
#include "
L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsDBProducer.h
"
5
6
#include <memory>
7
8
#include "
CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h
"
9
#include "
CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h
"
10
11
#include "
FWCore/ServiceRegistry/interface/Service.h
"
12
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
13
14
L1MuonOverlapParamsDBProducer::L1MuonOverlapParamsDBProducer
(
const
edm::ParameterSet
&
cfg
) {}
17
void
L1MuonOverlapParamsDBProducer::beginRun
(
edm::Run
const
&
run
,
edm::EventSetup
const
& iSetup) {
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
}
31
void
L1MuonOverlapParamsDBProducer::analyze
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& es) {
32
std::string
recordName
=
"L1TMuonOverlapParamsRcd"
;
33
edm::Service<cond::service::PoolDBOutputService>
poolDbService;
34
if
(poolDbService.
isAvailable
()) {
35
poolDbService->
writeOne
(
omtfParams
.get(), poolDbService->
currentTime
(),
recordName
);
36
}
37
}
40
#include "
FWCore/Framework/interface/MakerMacros.h
"
41
DEFINE_FWK_MODULE
(
L1MuonOverlapParamsDBProducer
);
L1TMuonOverlapParamsRcd
Definition:
L1TMuonOverlapParamsRcd.h:23
L1MuonOverlapParamsDBProducer::L1MuonOverlapParamsDBProducer
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)
Definition:
L1TMuonOverlapParamsDBProducer.cc:14
MessageLogger.h
ESHandle.h
edm::Run
Definition:
Run.h:45
align_cfg.recordName
recordName
Definition:
align_cfg.py:66
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:40
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
L1MuonOverlapParamsDBProducer
Definition:
L1TMuonOverlapParamsDBProducer.h:15
L1TMuonOverlapParamsDBProducer.h
Service.h
edm::ESHandle
Definition:
DTSurvey.h:22
L1TMuonOverlapParams.h
edm::ParameterSet
Definition:
ParameterSet.h:47
L1MuonOverlapParamsDBProducer::omtfParams
std::unique_ptr< L1TMuonOverlapParams > omtfParams
Definition:
L1TMuonOverlapParamsDBProducer.h:22
edm::Service< cond::service::PoolDBOutputService >
L1MuonOverlapParamsDBProducer::analyze
void analyze(const edm::Event &, const edm::EventSetup &es) override
Definition:
L1TMuonOverlapParamsDBProducer.cc:31
edm::EventSetup
Definition:
EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition:
looper.py:296
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
L1MuonOverlapParamsDBProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &es) override
Definition:
L1TMuonOverlapParamsDBProducer.cc:17
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:97
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition:
PoolDBOutputService.h:63
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition:
EventSetupRecordImplementation.h:74
L1TMuonOverlapParamsRcd.h
edm::Event
Definition:
Event.h:73
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition:
PoolDBOutputService.cc:217
Generated for CMSSW Reference Manual by
1.8.16