JetMETCorrections
Modules
plugins
QGLikelihoodESProducer.cc
Go to the documentation of this file.
1
/*
2
Description: ESProducer to get the quark-gluon likelihood object "QGLikelihoodObject"
3
from record "QGLikelihoodRcd".
4
5
Implementation:
6
Completely trivial, simply returns the QGLikelihoodObject to the user. There is only
7
one QGLikelihoodObject object in each record.
8
*/
9
// Original Author: Salvatore Rappoccio
10
// Created: Thu, 13 Mar 2014 15:02:39 GMT
11
12
// system include files
13
#include <memory>
14
15
// user include files
16
#include "
FWCore/Framework/interface/ModuleFactory.h
"
17
#include "
FWCore/Framework/interface/EventSetupRecordIntervalFinder.h
"
18
#include "
FWCore/Framework/interface/ESProducer.h
"
19
#include "
FWCore/Framework/interface/ESHandle.h
"
20
#include "
FWCore/Framework/interface/ModuleFactory.h
"
21
#include "
FWCore/Utilities/interface/do_nothing_deleter.h
"
22
23
#include "
CondFormats/JetMETObjects/interface/QGLikelihoodObject.h
"
24
#include "
CondFormats/DataRecord/interface/QGLikelihoodRcd.h
"
25
26
class
QGLikelihoodESProducer
:
public
edm::ESProducer
{
27
public
:
28
QGLikelihoodESProducer
(
const
edm::ParameterSet
&);
29
~QGLikelihoodESProducer
()
override
{};
30
31
std::shared_ptr<const QGLikelihoodObject>
produce
(
const
QGLikelihoodRcd
&);
32
33
private
:
34
const
edm::ESGetToken<QGLikelihoodObject, QGLikelihoodRcd>
token_
;
35
};
36
37
QGLikelihoodESProducer::QGLikelihoodESProducer
(
const
edm::ParameterSet
& iConfig)
38
: token_(setWhatProduced(this, iConfig.getParameter<
std
::
string
>(
"@module_label"
))
39
.consumes(
edm
::
ESInputTag
{
""
, iConfig.
getParameter
<
std::string
>(
"algo"
)})) {}
40
41
// Produce the data
42
std::shared_ptr<const QGLikelihoodObject>
QGLikelihoodESProducer::produce
(
const
QGLikelihoodRcd
& iRecord) {
43
return
std::shared_ptr<const QGLikelihoodObject>(&iRecord.
get
(
token_
),
edm::do_nothing_deleter
());
44
}
45
46
DEFINE_FWK_EVENTSETUP_MODULE
(
QGLikelihoodESProducer
);
QGLikelihoodESProducer
Definition:
QGLikelihoodESProducer.cc:26
ESHandle.h
ESInputTag
QGLikelihoodESProducer::produce
std::shared_ptr< const QGLikelihoodObject > produce(const QGLikelihoodRcd &)
Definition:
QGLikelihoodESProducer.cc:42
QGLikelihoodESProducer::~QGLikelihoodESProducer
~QGLikelihoodESProducer() override
Definition:
QGLikelihoodESProducer.cc:29
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::do_nothing_deleter
Definition:
do_nothing_deleter.h:34
ESProducer.h
QGLikelihoodRcd
Definition:
QGLikelihoodRcd.h:23
QGLikelihoodESProducer::QGLikelihoodESProducer
QGLikelihoodESProducer(const edm::ParameterSet &)
Definition:
QGLikelihoodESProducer.cc:37
QGLikelihoodESProducer::token_
const edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd > token_
Definition:
QGLikelihoodESProducer.cc:34
EventSetupRecordIntervalFinder.h
edm::ParameterSet
Definition:
ParameterSet.h:47
QGLikelihoodObject.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd >
ModuleFactory.h
std
Definition:
JetResolutionObject.h:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
QGLikelihoodRcd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition:
EventSetupRecordImplementation.h:74
do_nothing_deleter.h
Generated for CMSSW Reference Manual by
1.8.16