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 "
CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h
"
7
#include "
CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h
"
8
9
#include "
FWCore/ServiceRegistry/interface/Service.h
"
10
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
11
12
L1MuonOverlapParamsDBProducer::L1MuonOverlapParamsDBProducer
(
const
edm::ParameterSet
&
cfg
) {}
15
void
L1MuonOverlapParamsDBProducer::beginRun
(
edm::Run
const
&
run
,
edm::EventSetup
const
& iSetup) {
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
}
29
void
L1MuonOverlapParamsDBProducer::analyze
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& es) {
30
std::string
recordName
=
"L1TMuonOverlapParamsRcd"
;
31
edm::Service<cond::service::PoolDBOutputService>
poolDbService;
32
if
(poolDbService.
isAvailable
()) {
33
poolDbService->
writeOne
(
omtfParams
.get(), poolDbService->
currentTime
(),
recordName
);
34
}
35
}
38
#include "
FWCore/Framework/interface/MakerMacros.h
"
39
DEFINE_FWK_MODULE
(
L1MuonOverlapParamsDBProducer
);
L1TMuonOverlapParamsRcd
Definition:
L1TMuonOverlapParamsRcd.h:23
L1MuonOverlapParamsDBProducer::L1MuonOverlapParamsDBProducer
L1MuonOverlapParamsDBProducer(const edm::ParameterSet &cfg)
Definition:
L1TMuonOverlapParamsDBProducer.cc:12
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:73
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
Definition:
L1TMuonOverlapParams.h:14
L1TMuonOverlapParams.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::LogError
Definition:
MessageLogger.h:183
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:29
edm::EventSetup
Definition:
EventSetup.h:57
looper.cfg
cfg
Definition:
looper.py:297
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
L1MuonOverlapParamsDBProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &es) override
Definition:
L1TMuonOverlapParamsDBProducer.cc:15
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition:
PoolDBOutputService.h:56
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:179
Generated for CMSSW Reference Manual by
1.8.16