Alignment
CommonAlignment
src
AlignableMap.cc
Go to the documentation of this file.
1
#include "
Alignment/CommonAlignment/interface/AlignableMap.h
"
2
3
#include "
FWCore/Utilities/interface/Exception.h
"
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
6
//_____________________________________________________________________________
7
align::Alignables
&
AlignableMap::get
(
const
std::string
&
name
) {
return
theStore
[
name
]; }
8
9
//_____________________________________________________________________________
10
align::Alignables
&
AlignableMap::find
(
const
std::string
&
name
) {
11
typename
Container::iterator
o
=
theStore
.find(
name
);
12
13
if
(
theStore
.end() ==
o
) {
14
std::ostringstream knownKeys;
15
for
(
auto
it =
theStore
.begin(); it !=
theStore
.end(); ++it) {
16
knownKeys << (it !=
theStore
.begin() ?
", "
:
""
) << it->first;
17
}
18
19
throw
cms::Exception
(
"AlignableMapError"
) <<
"Cannot find an object of name "
<<
name
<<
" in AlignableMap, "
20
<<
"know only "
<< knownKeys.str() <<
"."
;
21
}
22
23
return
o
->second;
24
}
25
26
//_____________________________________________________________________________
27
void
AlignableMap::dump
(
void
)
const
{
28
edm::LogInfo
(
"AlignableMap"
) <<
"Printing out AlignSetup: "
;
29
for
(
typename
Container::const_iterator it =
theStore
.begin(); it !=
theStore
.end(); ++it) {
30
edm::LogVerbatim
(
"AlignableMap"
) << it->first << std::endl;
31
}
32
}
MessageLogger.h
AlignableMap::theStore
Container theStore
Definition:
AlignableMap.h:46
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
AlignableMap::dump
void dump(void) const
Print the name of all stored data.
Definition:
AlignableMap.cc:27
AlignableMap::find
align::Alignables & find(const std::string &name="")
Definition:
AlignableMap.cc:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
align::Alignables
std::vector< Alignable * > Alignables
Definition:
Utilities.h:31
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
Exception
Definition:
hltDiff.cc:245
AlignableMap.h
AlignableMap::get
align::Alignables & get(const std::string &name="")
Definition:
AlignableMap.cc:7
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
Exception.h
Generated for CMSSW Reference Manual by
1.8.16