RecoMuon
TransientTrackingRecHit
plugins
MuonTransientTrackingRecHitBuilderESProducer.cc
Go to the documentation of this file.
1
9
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
10
#include "
TrackingTools/Records/interface/TransientRecHitRecord.h
"
11
12
#include "
RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHitBuilder.h
"
13
14
#include "
FWCore/Framework/interface/EventSetup.h
"
15
#include "
FWCore/Framework/interface/ESHandle.h
"
16
#include "
FWCore/Framework/interface/ESProducer.h
"
17
#include "
FWCore/Framework/interface/ModuleFactory.h
"
18
19
#include "
Geometry/Records/interface/GlobalTrackingGeometryRecord.h
"
20
#include "
Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h
"
21
#include "
TrackingTools/Records/interface/TransientRecHitRecord.h
"
22
23
#include <memory>
24
25
class
MuonTransientTrackingRecHitBuilderESProducer
:
public
edm::ESProducer
{
26
public
:
28
MuonTransientTrackingRecHitBuilderESProducer
(
const
edm::ParameterSet
&);
29
30
// Operations
31
std::unique_ptr<TransientTrackingRecHitBuilder>
produce
(
const
TransientRecHitRecord
&);
32
33
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
34
35
private
:
36
edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord>
const
trackingGeometryToken_
;
37
};
38
39
using namespace
edm
;
40
using namespace
std
;
41
42
MuonTransientTrackingRecHitBuilderESProducer::MuonTransientTrackingRecHitBuilderESProducer
(
43
const
ParameterSet
&
parameterSet
)
44
: trackingGeometryToken_(setWhatProduced(this,
parameterSet
.getParameter<
string
>(
"ComponentName"
))
45
.consumesFrom<
GlobalTrackingGeometry
,
GlobalTrackingGeometryRecord
>()) {}
46
47
std::unique_ptr<TransientTrackingRecHitBuilder>
MuonTransientTrackingRecHitBuilderESProducer::produce
(
48
const
TransientRecHitRecord
& iRecord) {
49
return
std::make_unique<MuonTransientTrackingRecHitBuilder>(iRecord.
getHandle
(
trackingGeometryToken_
));
50
}
51
52
void
MuonTransientTrackingRecHitBuilderESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
53
edm::ParameterSetDescription
desc
;
54
desc
.add<
string
>(
"ComponentName"
);
55
descriptions.
addDefault
(
desc
);
56
}
57
58
DEFINE_FWK_EVENTSETUP_MODULE
(
MuonTransientTrackingRecHitBuilderESProducer
);
MuonTransientTrackingRecHitBuilderESProducer
Definition:
MuonTransientTrackingRecHitBuilderESProducer.cc:25
MuonTransientTrackingRecHitBuilderESProducer::MuonTransientTrackingRecHitBuilderESProducer
MuonTransientTrackingRecHitBuilderESProducer(const edm::ParameterSet &)
Constructor.
Definition:
MuonTransientTrackingRecHitBuilderESProducer.cc:42
ESHandle.h
edm::eventsetup::DependentRecordImplementation::getHandle
ESHandle< ProductT > getHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:87
edm
HLT enums.
Definition:
AlignableModifier.h:19
TransientRecHitRecord.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
MuonTransientTrackingRecHitBuilderESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
MuonTransientTrackingRecHitBuilderESProducer.cc:52
TransientRecHitRecord
Definition:
TransientRecHitRecord.h:14
ESProducer.h
GlobalTrackingGeometryRecord
Definition:
GlobalTrackingGeometryRecord.h:17
MuonTransientTrackingRecHitBuilderESProducer::trackingGeometryToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeometryToken_
Definition:
MuonTransientTrackingRecHitBuilderESProducer.cc:36
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition:
Provenance.cc:11
GlobalTrackingGeometry
Definition:
GlobalTrackingGeometry.h:20
GlobalTrackingGeometryRecord.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
std
Definition:
JetResolutionObject.h:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
MuonTransientTrackingRecHitBuilder.h
MuonTransientTrackingRecHitBuilderESProducer::produce
std::unique_ptr< TransientTrackingRecHitBuilder > produce(const TransientRecHitRecord &)
Definition:
MuonTransientTrackingRecHitBuilderESProducer.cc:47
EventSetup.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
GlobalTrackingGeometry.h
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
Generated for CMSSW Reference Manual by
1.8.16