Geometry
TrackerGeometryBuilder
plugins
TrackerAdditionalParametersPerDetESModule.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/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
8
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
9
#include "
Geometry/Records/interface/PTrackerAdditionalParametersPerDetRcd.h
"
10
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
11
#include "
Geometry/TrackerNumberingBuilder/interface/GeometricDet.h
"
12
#include "
CondFormats/GeometryObjects/interface/PTrackerAdditionalParametersPerDet.h
"
13
14
#include <memory>
15
16
namespace
edm
{
17
class
ConfigurationDescriptions
;
18
}
19
class
PTrackerAdditionalParametersPerDet
;
20
class
PTrackerAdditionalParametersPerDetRcd
;
21
22
class
TrackerAdditionalParametersPerDetESModule
:
public
edm::ESProducer
{
23
public
:
24
TrackerAdditionalParametersPerDetESModule
(
const
edm::ParameterSet
&);
25
26
using
ReturnType
= std::unique_ptr<PTrackerAdditionalParametersPerDet>;
27
28
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
29
30
ReturnType
produce
(
const
PTrackerAdditionalParametersPerDetRcd
&);
31
32
private
:
33
edm::ESGetToken<GeometricDet, IdealGeometryRecord>
geometricDetToken_
;
34
};
35
36
TrackerAdditionalParametersPerDetESModule::TrackerAdditionalParametersPerDetESModule
(
const
edm::ParameterSet
& ps) {
37
auto
cc
=
setWhatProduced
(
this
);
38
geometricDetToken_
=
cc
.consumesFrom<
GeometricDet
,
IdealGeometryRecord
>(
edm::ESInputTag
());
39
}
40
41
void
TrackerAdditionalParametersPerDetESModule::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
42
edm::ParameterSetDescription
desc
;
43
descriptions.
add
(
"TrackerAdditionalParametersPerDet"
,
desc
);
44
}
45
46
TrackerAdditionalParametersPerDetESModule::ReturnType
TrackerAdditionalParametersPerDetESModule::produce
(
47
const
PTrackerAdditionalParametersPerDetRcd
& iRecord) {
48
edm::LogInfo
(
"TrackerAdditionalParametersPerDet"
)
49
<<
"TrackerAdditionalParametersPerDetESModule::produce(const PTrackerAdditionalParametersPerDetRcd& iRecord)"
;
50
51
auto
ptitp = std::make_unique<PTrackerAdditionalParametersPerDet>();
52
53
edm::ESTransientHandle<GeometricDet>
gd = iRecord.
getTransientHandle
(
geometricDetToken_
);
54
55
std::vector<const GeometricDet*>
comp
;
56
gd->
deepComponents
(
comp
);
57
58
for
(
auto
&
i
:
comp
) {
59
ptitp->setGeographicalId(
i
->geographicalId());
60
ptitp->setBricked(
i
->isBricked());
61
}
62
63
return
ptitp;
64
}
65
66
DEFINE_FWK_EVENTSETUP_MODULE
(
TrackerAdditionalParametersPerDetESModule
);
ConfigurationDescriptions.h
AlCaHLTBitMon_QueryRunRegistry.comp
string comp
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:249
TrackerAdditionalParametersPerDetESModule
Definition:
TrackerAdditionalParametersPerDetESModule.cc:22
TrackerAdditionalParametersPerDetESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
TrackerAdditionalParametersPerDetESModule.cc:41
mps_fire.i
i
Definition:
mps_fire.py:428
edm::ESInputTag
Definition:
ESInputTag.h:87
PTrackerAdditionalParametersPerDetRcd
Definition:
PTrackerAdditionalParametersPerDetRcd.h:9
ESTransientHandle.h
ESHandle.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
PTrackerAdditionalParametersPerDet
Definition:
PTrackerAdditionalParametersPerDet.h:9
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
PTrackerAdditionalParametersPerDetRcd.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:98
TrackerAdditionalParametersPerDetESModule::TrackerAdditionalParametersPerDetESModule
TrackerAdditionalParametersPerDetESModule(const edm::ParameterSet &)
Definition:
TrackerAdditionalParametersPerDetESModule.cc:36
GeometricDet
Definition:
GeometricDet.h:31
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
TrackerAdditionalParametersPerDetESModule::geometricDetToken_
edm::ESGetToken< GeometricDet, IdealGeometryRecord > geometricDetToken_
Definition:
TrackerAdditionalParametersPerDetESModule.cc:33
TrackerAdditionalParametersPerDetESModule::produce
ReturnType produce(const PTrackerAdditionalParametersPerDetRcd &)
Definition:
TrackerAdditionalParametersPerDetESModule.cc:46
IdealGeometryRecord.h
GeometricDet::deepComponents
ConstGeometricDetContainer deepComponents() const
Definition:
GeometricDet.cc:252
GeometricDet.h
cc
edm::ESGetToken< GeometricDet, IdealGeometryRecord >
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
ConfigurationDescriptions
TrackerAdditionalParametersPerDetESModule::ReturnType
std::unique_ptr< PTrackerAdditionalParametersPerDet > ReturnType
Definition:
TrackerAdditionalParametersPerDetESModule.cc:26
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
PTrackerAdditionalParametersPerDet.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:25
Generated for CMSSW Reference Manual by
1.8.16