Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Geometry
HGCalCommonData
plugins
HGCalParametersESModule.cc
Go to the documentation of this file.
1
#include "
DetectorDescription/Core/interface/DDCompactView.h
"
2
#include "
DetectorDescription/DDCMS/interface/DDCompactView.h
"
3
#include "
FWCore/Framework/interface/ESProducer.h
"
4
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
5
#include "
FWCore/Framework/interface/ModuleFactory.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
9
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
10
#include "
Geometry/HGCalCommonData/interface/HGCalParameters.h
"
11
#include "
Geometry/HGCalCommonData/interface/HGCalParametersFromDD.h
"
12
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
13
14
//#define EDM_ML_DEBUG
15
16
class
HGCalParametersESModule
:
public
edm::ESProducer
{
17
public
:
18
HGCalParametersESModule
(
const
edm::ParameterSet
&);
19
20
using
ReturnType
= std::unique_ptr<HGCalParameters>;
21
22
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
23
24
ReturnType
produce
(
const
IdealGeometryRecord
&);
25
26
private
:
27
std::string
name_
,
name2_
,
namew_
,
namec_
,
namet_
,
namex_
;
28
bool
fromDD4Hep_
;
29
edm::ESGetToken<DDCompactView, IdealGeometryRecord>
cpvTokenDDD_
;
30
edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord>
cpvTokenDD4Hep_
;
31
};
32
33
HGCalParametersESModule::HGCalParametersESModule
(
const
edm::ParameterSet
& iC) {
34
name_
= iC.
getParameter
<
std::string
>(
"name"
);
35
name2_
= iC.
getParameter
<
std::string
>(
"name2"
);
36
namew_
= iC.
getParameter
<
std::string
>(
"nameW"
);
37
namec_
= iC.
getParameter
<
std::string
>(
"nameC"
);
38
namet_
= iC.
getParameter
<
std::string
>(
"nameT"
);
39
namex_
= iC.
getParameter
<
std::string
>(
"nameX"
);
40
fromDD4Hep_
= iC.
getParameter
<
bool
>(
"fromDD4Hep"
);
41
#ifdef EDM_ML_DEBUG
42
edm::LogVerbatim
(
"HGCalGeom"
) <<
"HGCalParametersESModule for "
<<
name_
<<
":"
<<
namew_
<<
":"
<<
namec_
<<
":"
43
<<
namet_
<<
" and fromDD4Hep flag "
<<
fromDD4Hep_
;
44
#endif
45
auto
cc
=
setWhatProduced
(
this
,
namex_
);
46
if
(
fromDD4Hep_
)
47
cpvTokenDD4Hep_
=
cc
.consumesFrom<
cms::DDCompactView
,
IdealGeometryRecord
>(
edm::ESInputTag
());
48
else
49
cpvTokenDDD_
=
cc
.consumes<
DDCompactView
>(
edm::ESInputTag
());
50
}
51
52
void
HGCalParametersESModule::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
53
edm::ParameterSetDescription
desc
;
54
desc
.add<
std::string
>(
"name"
,
"HGCalEESensitive"
);
55
desc
.add<
std::string
>(
"name2"
,
"HGCalEE"
);
56
desc
.add<
std::string
>(
"nameW"
,
"HGCalEEWafer"
);
57
desc
.add<
std::string
>(
"nameC"
,
"HGCalEECell"
);
58
desc
.add<
std::string
>(
"nameT"
,
"HGCal"
);
59
desc
.add<
std::string
>(
"nameX"
,
"HGCalEESensitive"
);
60
desc
.add<
bool
>(
"fromDD4Hep"
,
false
);
61
descriptions.
add
(
"hgcalEEParametersInitialize"
,
desc
);
62
}
63
64
HGCalParametersESModule::ReturnType
HGCalParametersESModule::produce
(
const
IdealGeometryRecord
& iRecord) {
65
#ifdef EDM_ML_DEBUG
66
edm::LogVerbatim
(
"HGCalGeom"
) <<
"HGCalParametersESModule::produce(const IdealGeometryRecord& iRecord)"
;
67
#endif
68
auto
ptp = std::make_unique<HGCalParameters>(
name_
);
69
HGCalParametersFromDD
builder;
70
if
(
fromDD4Hep_
) {
71
#ifdef EDM_ML_DEBUG
72
edm::LogVerbatim
(
"HGCalGeom"
) <<
"HGCalParametersESModule::Try to access cms::DDCompactView"
;
73
#endif
74
edm::ESTransientHandle<cms::DDCompactView>
cpv = iRecord.
getTransientHandle
(
cpvTokenDD4Hep_
);
75
builder.
build
(cpv.
product
(), *ptp,
name_
,
namew_
,
namec_
,
namet_
,
name2_
);
76
}
else
{
77
#ifdef EDM_ML_DEBUG
78
edm::LogVerbatim
(
"HGCalGeom"
) <<
"HGCalParametersESModule::Try to access DDCompactView"
;
79
#endif
80
edm::ESTransientHandle<DDCompactView>
cpv = iRecord.
getTransientHandle
(
cpvTokenDDD_
);
81
builder.
build
(cpv.
product
(), *ptp,
name_
,
namew_
,
namec_
,
namet_
);
82
}
83
return
ptp;
84
}
85
86
// define this as a plug-in
87
DEFINE_FWK_EVENTSETUP_MODULE
(
HGCalParametersESModule
);
ConfigurationDescriptions.h
HGCalParametersESModule
Definition:
HGCalParametersESModule.cc:16
edm::ESInputTag
Definition:
ESInputTag.h:87
ESTransientHandle.h
MessageLogger.h
edm::ESTransientHandle::product
T const * product() const
Definition:
ESTransientHandle.h:51
HGCalParametersESModule::namec_
std::string namec_
Definition:
HGCalParametersESModule.cc:27
HGCalParametersESModule::name_
std::string name_
Definition:
HGCalParametersESModule.cc:27
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
HGCalParametersESModule::produce
ReturnType produce(const IdealGeometryRecord &)
Definition:
HGCalParametersESModule.cc:64
HGCalParametersESModule::ReturnType
std::unique_ptr< HGCalParameters > ReturnType
Definition:
HGCalParametersESModule.cc:20
DDCompactView.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition:
DDCompactView.h:81
HGCalParametersFromDD.h
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:98
HGCalParametersESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HGCalParametersESModule.cc:52
DDCompactView.h
HGCalParametersESModule::fromDD4Hep_
bool fromDD4Hep_
Definition:
HGCalParametersESModule.cc:28
ParameterSetDescription.h
HGCalParametersFromDD
Definition:
HGCalParametersFromDD.h:12
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
IdealGeometryRecord.h
cc
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
HGCalParametersESModule::cpvTokenDDD_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition:
HGCalParametersESModule.cc:29
HGCalParametersESModule::namex_
std::string namex_
Definition:
HGCalParametersESModule.cc:27
HGCalParametersESModule::name2_
std::string name2_
Definition:
HGCalParametersESModule.cc:27
HGCalParametersFromDD::build
bool build(const DDCompactView *cpv, HGCalParameters &php, const std::string &name, const std::string &namew, const std::string &namec, const std::string &namet)
Definition:
HGCalParametersFromDD.cc:57
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
HGCalParametersESModule::cpvTokenDD4Hep_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition:
HGCalParametersESModule.cc:30
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
cms::DDCompactView
Definition:
DDCompactView.h:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
HGCalParametersESModule::namew_
std::string namew_
Definition:
HGCalParametersESModule.cc:27
HGCalParameters.h
HGCalParametersESModule::HGCalParametersESModule
HGCalParametersESModule(const edm::ParameterSet &)
Definition:
HGCalParametersESModule.cc:33
IdealGeometryRecord
Definition:
IdealGeometryRecord.h:25
HGCalParametersESModule::namet_
std::string namet_
Definition:
HGCalParametersESModule.cc:27
Generated for CMSSW Reference Manual by
1.8.16