Geometry
MuonNumbering
src
MuonGeometryConstants.cc
Go to the documentation of this file.
1
#include "
Geometry/MuonNumbering/interface/MuonGeometryConstants.h
"
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include "
FWCore/Utilities/interface/Exception.h
"
5
6
//#define EDM_ML_DEBUG
7
8
int
MuonGeometryConstants::getValue
(
const
std::string
&
name
)
const
{
9
#ifdef EDM_ML_DEBUG
10
edm::LogVerbatim
(
"MuonGeom"
) <<
"about to look for ... "
<<
name
<< std::endl;
11
#endif
12
if
(
namesAndValues_
.empty())
13
throw
cms::Exception
(
"GeometryBuildFailure"
,
"MuonGeometryConstants does not have requested value for "
+
name
);
14
15
std::map<std::string, int>::const_iterator findIt =
namesAndValues_
.find(
name
);
16
if
(findIt ==
namesAndValues_
.end())
17
throw
cms::Exception
(
"GeometryBuildFailure"
,
"MuonGeometryConstants does not have requested value for "
+
name
);
18
19
#ifdef EDM_ML_DEBUG
20
edm::LogVerbatim
(
"MuonGeom"
) <<
"MuonGeometryConstants::Value for "
<<
name
<<
" is "
<< findIt->second;
21
#endif
22
return
findIt->second;
23
}
24
25
void
MuonGeometryConstants::addValue
(
const
std::string
&
name
,
const
int
&
value
) {
namesAndValues_
[
name
] =
value
; }
26
27
#include "
FWCore/Utilities/interface/typelookup.h
"
28
29
TYPELOOKUP_DATA_REG
(
MuonGeometryConstants
);
MuonGeometryConstants::namesAndValues_
std::map< std::string, int > namesAndValues_
Definition:
MuonGeometryConstants.h:38
MuonGeometryConstants
Definition:
MuonGeometryConstants.h:20
MessageLogger.h
MuonGeometryConstants.h
MuonGeometryConstants::addValue
void addValue(const std::string &name, const int &value)
Definition:
MuonGeometryConstants.cc:25
typelookup.h
value
Definition:
value.py:1
MuonGeometryConstants::getValue
int getValue(const std::string &name) const
Definition:
MuonGeometryConstants.cc:8
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition:
typelookup.h:102
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
Exception.h
cms::Exception
Definition:
Exception.h:70
Generated for CMSSW Reference Manual by
1.8.16