TrackingTools
Producers
src
TrajectoryCleanerESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ModuleFactory.h
"
2
#include "
FWCore/Framework/interface/ESProducer.h
"
3
4
#include "
FWCore/Framework/interface/ESHandle.h
"
5
6
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
7
#include "
TrackingTools/TrajectoryCleaning/interface/TrajectoryCleaner.h
"
8
9
#include "
TrackingTools/TrajectoryCleaning/interface/TrajectoryCleanerFactory.h
"
10
11
class
TrajectoryCleanerESProducer
:
public
edm::ESProducer
{
12
public
:
13
TrajectoryCleanerESProducer
(
const
edm::ParameterSet
&);
14
~TrajectoryCleanerESProducer
()
override
;
15
16
typedef
std::unique_ptr<TrajectoryCleaner>
ReturnType
;
17
18
ReturnType
produce
(
const
TrackingComponentsRecord
&);
19
20
private
:
21
std::string
theComponentName
;
22
std::string
theComponentType
;
23
edm::ParameterSet
theConfig
;
24
};
25
26
TrajectoryCleanerESProducer::TrajectoryCleanerESProducer
(
const
edm::ParameterSet
& iConfig) {
27
theComponentName
= iConfig.
getParameter
<
std::string
>(
"ComponentName"
);
28
theComponentType
= iConfig.
getParameter
<
std::string
>(
"ComponentType"
);
29
30
theConfig
= iConfig;
31
setWhatProduced
(
this
,
theComponentName
);
32
}
33
34
TrajectoryCleanerESProducer::~TrajectoryCleanerESProducer
() {}
35
36
// ------------ method called to produce the data ------------
37
TrajectoryCleanerESProducer::ReturnType
TrajectoryCleanerESProducer::produce
(
const
TrackingComponentsRecord
& iRecord) {
38
using namespace
edm::es
;
39
40
return
ReturnType
(
TrajectoryCleanerFactory::get
()->
create
(
theComponentType
,
theConfig
));
41
}
42
43
DEFINE_FWK_EVENTSETUP_MODULE
(
TrajectoryCleanerESProducer
);
ESHandle.h
TrajectoryCleanerESProducer::produce
ReturnType produce(const TrackingComponentsRecord &)
Definition:
TrajectoryCleanerESProducer.cc:37
TrajectoryCleaner.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
TrajectoryCleanerESProducer
Definition:
TrajectoryCleanerESProducer.cc:11
ESProducer.h
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition:
beamerCreator.py:44
TrajectoryCleanerESProducer::TrajectoryCleanerESProducer
TrajectoryCleanerESProducer(const edm::ParameterSet &)
Definition:
TrajectoryCleanerESProducer.cc:26
TrajectoryCleanerESProducer::theConfig
edm::ParameterSet theConfig
Definition:
TrajectoryCleanerESProducer.cc:23
TrajectoryCleanerESProducer::theComponentName
std::string theComponentName
Definition:
TrajectoryCleanerESProducer.cc:21
TrajectoryCleanerESProducer::~TrajectoryCleanerESProducer
~TrajectoryCleanerESProducer() override
Definition:
TrajectoryCleanerESProducer.cc:34
edm::ParameterSet
Definition:
ParameterSet.h:47
TrajectoryCleanerFactory.h
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TrajectoryCleanerESProducer::ReturnType
std::unique_ptr< TrajectoryCleaner > ReturnType
Definition:
TrajectoryCleanerESProducer.cc:16
ModuleFactory.h
TrajectoryCleanerESProducer::theComponentType
std::string theComponentType
Definition:
TrajectoryCleanerESProducer.cc:22
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TrackingComponentsRecord.h
edm::es
Definition:
es_Label.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
Generated for CMSSW Reference Manual by
1.8.16