TrackingTools
PatternTools
plugins
TSCBLBuilderWithPropagatorESProducer.cc
Go to the documentation of this file.
1
//
2
// Original Author: Matt Rudolph
3
// Created: Sat Mar 28 20:13:08 CET 2009
4
//
5
//
6
7
// system include files
8
#include <memory>
9
10
// user include files
11
#include "
FWCore/Framework/interface/ModuleFactory.h
"
12
#include "
FWCore/Framework/interface/ESProducer.h
"
13
#include "
FWCore/Framework/interface/ESHandle.h
"
14
15
#include "
TrackingTools/PatternTools/interface/TrajectoryStateClosestToBeamLineBuilder.h
"
16
#include "
TrackingTools/PatternTools/interface/TSCBLBuilderWithPropagator.h
"
17
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
18
19
//
20
// class decleration
21
//
22
23
class
TSCBLBuilderWithPropagatorESProducer
:
public
edm::ESProducer
{
24
public
:
25
TSCBLBuilderWithPropagatorESProducer
(
const
edm::ParameterSet
&);
26
~TSCBLBuilderWithPropagatorESProducer
()
override
;
27
28
typedef
std::unique_ptr<TrajectoryStateClosestToBeamLineBuilder>
ReturnType
;
29
30
ReturnType
produce
(
const
TrackingComponentsRecord
&);
31
32
private
:
33
// ----------member data ---------------------------
34
edm::ParameterSet
pset_
;
35
};
36
37
//
38
// constants, enums and typedefs
39
//
40
41
//
42
// static data member definitions
43
//
44
45
//
46
// constructors and destructor
47
//
48
TSCBLBuilderWithPropagatorESProducer::TSCBLBuilderWithPropagatorESProducer
(
const
edm::ParameterSet
&
p
) {
49
//the following line is needed to tell the framework what
50
// data is being produced
51
std::string
myName =
p
.getParameter<
std::string
>(
"ComponentName"
);
52
pset_
=
p
;
53
setWhatProduced
(
this
, myName);
54
55
//now do what ever other initialization is needed
56
}
57
58
TSCBLBuilderWithPropagatorESProducer::~TSCBLBuilderWithPropagatorESProducer
() {
59
// do anything here that needs to be done at desctruction time
60
// (e.g. close files, deallocate resources etc.)
61
}
62
63
//
64
// member functions
65
//
66
67
// ------------ method called to produce the data ------------
68
TSCBLBuilderWithPropagatorESProducer::ReturnType
TSCBLBuilderWithPropagatorESProducer::produce
(
69
const
TrackingComponentsRecord
& iRecord) {
70
using namespace
edm::es
;
71
std::string
propname =
pset_
.
getParameter
<
std::string
>(
"Propagator"
);
72
73
edm::ESHandle<Propagator>
theProp;
74
iRecord.
get
(propname, theProp);
75
76
const
Propagator
* pro = theProp.product();
77
78
auto
pTSCBLBuilderWithPropagator = std::make_unique<TSCBLBuilderWithPropagator>(*pro);
79
80
return
pTSCBLBuilderWithPropagator;
81
}
82
83
//define this as a plug-in
84
DEFINE_FWK_EVENTSETUP_MODULE
(
TSCBLBuilderWithPropagatorESProducer
);
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
TSCBLBuilderWithPropagatorESProducer::ReturnType
std::unique_ptr< TrajectoryStateClosestToBeamLineBuilder > ReturnType
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:28
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:138
TSCBLBuilderWithPropagatorESProducer::TSCBLBuilderWithPropagatorESProducer
TSCBLBuilderWithPropagatorESProducer(const edm::ParameterSet &)
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:48
ESProducer.h
Propagator
Definition:
Propagator.h:44
TrajectoryStateClosestToBeamLineBuilder.h
edm::ESHandle< Propagator >
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
TSCBLBuilderWithPropagator.h
TSCBLBuilderWithPropagatorESProducer
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:23
TSCBLBuilderWithPropagatorESProducer::~TSCBLBuilderWithPropagatorESProducer
~TSCBLBuilderWithPropagatorESProducer() override
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:58
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
TSCBLBuilderWithPropagatorESProducer::produce
ReturnType produce(const TrackingComponentsRecord &)
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:68
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TSCBLBuilderWithPropagatorESProducer::pset_
edm::ParameterSet pset_
Definition:
TSCBLBuilderWithPropagatorESProducer.cc:34
TrackingComponentsRecord.h
edm::es
Definition:
es_Label.h:33
edm::ESProducer
Definition:
ESProducer.h:101
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
Generated for CMSSW Reference Manual by
1.8.16