TrackingTools
TrackFitters
plugins
KFFittingSmootherESProducer.cc
Go to the documentation of this file.
1
2
3
// to be included only here...
4
#include "
KFFittingSmoother.h
"
5
6
#include "
FWCore/Framework/interface/ESHandle.h
"
7
8
#include "
FWCore/Framework/interface/ESProducer.h
"
9
#include "
TrackingTools/TrackFitters/interface/TrajectoryFitterRecord.h
"
10
11
namespace
{
12
13
class
KFFittingSmootherESProducer final :
public
edm::ESProducer
{
14
public
:
15
KFFittingSmootherESProducer
(
const
edm::ParameterSet
&
p
) :
pset_
{
p
} {
16
std::string
myname =
p
.getParameter<
std::string
>(
"ComponentName"
);
17
auto
cc
=
setWhatProduced
(
this
, myname);
18
fitToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
pset_
.
getParameter
<
std::string
>(
"Fitter"
)));
19
smoothToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
pset_
.
getParameter
<
std::string
>(
"Smoother"
)));
20
}
21
22
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
23
edm::ParameterSetDescription
desc
;
24
desc
.add<
std::string
>(
"ComponentName"
,
"KFFittingSmoother"
);
25
desc
.add<
std::string
>(
"Fitter"
,
"KFFitter"
);
26
desc
.add<
std::string
>(
"Smoother"
,
"KFSmoother"
);
27
KFFittingSmoother::fillDescriptions
(
desc
);
28
descriptions.
add
(
"KFFittingSmoother"
,
desc
);
29
}
30
31
std::unique_ptr<TrajectoryFitter>
produce
(
const
TrajectoryFitterRecord
& iRecord) {
32
return
std::make_unique<KFFittingSmoother>(iRecord.
get
(fitToken_), iRecord.
get
(smoothToken_),
pset_
);
33
}
34
35
private
:
36
const
edm::ParameterSet
pset_
;
37
edm::ESGetToken<TrajectoryFitter, TrajectoryFitterRecord>
fitToken_;
38
edm::ESGetToken<TrajectorySmoother, TrajectoryFitterRecord>
smoothToken_;
39
};
40
}
// namespace
41
42
#include "
FWCore/Framework/interface/ModuleFactory.h
"
43
44
DEFINE_FWK_EVENTSETUP_MODULE
(KFFittingSmootherESProducer);
edm::ESInputTag
Definition:
ESInputTag.h:87
KFFittingSmoother.h
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrajectoryFitterRecord
Definition:
TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:103
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
KFFittingSmootherESProducer::pset_
edm::ParameterSet pset_
Definition:
KFFittingSmootherESProducer.h:22
cc
edm::ESGetToken< TrajectoryFitter, TrajectoryFitterRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
KFFittingSmootherESProducer::KFFittingSmootherESProducer
KFFittingSmootherESProducer(const edm::ParameterSet &p)
KFFittingSmootherESProducer::produce
std::unique_ptr< TrajectoryFitter > produce(const TrajectoryFitterRecord &)
Generated for CMSSW Reference Manual by
1.8.16