Geometry
TrackerGeometryBuilder
plugins
dd4hep
TrackerParametersESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ESProducer.h
"
2
#include "
FWCore/Framework/interface/ModuleFactory.h
"
3
#include "
FWCore/Framework/interface/ESHandle.h
"
4
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
5
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
9
#include "
DetectorDescription/DDCMS/interface/DDCompactView.h
"
10
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
11
#include "
Geometry/Records/interface/PTrackerParametersRcd.h
"
12
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
13
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerParametersFromDD.h
"
14
#include "
CondFormats/GeometryObjects/interface/PTrackerParameters.h
"
15
16
#include <memory>
17
18
namespace
edm
{
19
class
ConfigurationDescriptions
;
20
}
21
class
PTrackerParameters
;
22
class
PTrackerParametersRcd
;
23
24
class
TrackerParametersESProducer
:
public
edm::ESProducer
{
25
public
:
26
TrackerParametersESProducer
(
const
edm::ParameterSet
&);
27
~TrackerParametersESProducer
(
void
)
override
;
28
29
using
ReturnType
= std::unique_ptr<PTrackerParameters>;
30
31
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
32
33
ReturnType
produce
(
const
PTrackerParametersRcd
&);
34
};
35
36
TrackerParametersESProducer::TrackerParametersESProducer
(
const
edm::ParameterSet
&) {
37
edm::LogInfo
(
"TRACKER"
) <<
"TrackerParametersESProducer::TrackerParametersESProducer"
;
38
39
setWhatProduced
(
this
);
40
}
41
42
TrackerParametersESProducer::~TrackerParametersESProducer
() {}
43
44
void
TrackerParametersESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
45
edm::ParameterSetDescription
desc;
46
descriptions.
add
(
"DD4hep_trackerParameters"
, desc);
47
}
48
49
TrackerParametersESProducer::ReturnType
TrackerParametersESProducer::produce
(
const
PTrackerParametersRcd
& iRecord) {
50
edm::LogInfo
(
"TrackerParametersESProducer"
)
51
<<
"TrackerParametersESProducer::produce(const PTrackerParametersRcd& iRecord)"
<< std::endl;
52
edm::ESTransientHandle<cms::DDCompactView>
cpv;
53
iRecord.
getRecord
<
IdealGeometryRecord
>().
get
(cpv);
54
55
auto
ptp = std::make_unique<PTrackerParameters>();
56
TrackerParametersFromDD
builder;
57
builder.
build
(&(*cpv), *ptp);
58
59
return
ptp;
60
}
61
62
DEFINE_FWK_EVENTSETUP_MODULE
(
TrackerParametersESProducer
);
ConfigurationDescriptions.h
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:51
TrackerParametersFromDD.h
ESTransientHandle.h
MessageLogger.h
PTrackerParameters
Definition:
PTrackerParameters.h:6
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::LogInfo
Definition:
MessageLogger.h:254
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:138
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
PTrackerParameters.h
TrackerParametersESProducer::~TrackerParametersESProducer
~TrackerParametersESProducer(void) override
Definition:
TrackerParametersESProducer.cc:42
PTrackerParametersRcd
Definition:
PTrackerParametersRcd.h:9
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
TrackerParametersESProducer
Definition:
TrackerParametersESProducer.cc:24
TrackerParametersESProducer::TrackerParametersESProducer
TrackerParametersESProducer(const edm::ParameterSet &)
Definition:
TrackerParametersESProducer.cc:36
DDCompactView.h
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:36
TrackerParametersESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
TrackerParametersESProducer.cc:44
PTrackerParametersRcd.h
IdealGeometryRecord.h
get
#define get
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
ModuleFactory.h
ConfigurationDescriptions
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TrackerParametersESProducer::ReturnType
std::unique_ptr< PTrackerParameters > ReturnType
Definition:
TrackerParametersESProducer.cc:29
TrackerParametersFromDD::build
bool build(const DDCompactView *, PTrackerParameters &)
Definition:
TrackerParametersFromDD.cc:9
edm::ESProducer
Definition:
ESProducer.h:101
TrackerParametersESProducer::produce
ReturnType produce(const PTrackerParametersRcd &)
Definition:
TrackerParametersESProducer.cc:49
TrackerParametersFromDD
Definition:
TrackerParametersFromDD.h:14
ParameterSet.h
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:27
Generated for CMSSW Reference Manual by
1.8.16