src
Geometry
TrackerNumberingBuilder
plugins
ExtractStringFromDDD.cc
Go to the documentation of this file.
1
#include "
Geometry/TrackerNumberingBuilder/plugins/ExtractStringFromDDD.h
"
2
#include "
DetectorDescription/Core/interface/DDFilteredView.h
"
3
#include "
DetectorDescription/DDCMS/interface/DDFilteredView.h
"
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
5
#include <vector>
6
#include <string>
7
8
template
<>
9
std::string
ExtractStringFromDDD<DDFilteredView>::getString
(
const
std::string
&
s
,
DDFilteredView
*fv) {
10
DDValue
val
(
s
);
11
std::vector<const DDsvalues_type *>
result
;
12
fv->
specificsV
(
result
);
13
std::vector<const DDsvalues_type *>::iterator
it
=
result
.begin();
14
bool
foundIt =
false
;
15
for
(;
it
!=
result
.end(); ++
it
) {
16
foundIt =
DDfetch
(*
it
,
val
);
17
if
(foundIt)
18
break
;
19
}
20
if
(foundIt) {
21
std::vector<std::string>
const
&
temp
=
val
.strings();
22
if
(
temp
.size() != 1) {
23
throw
cms::Exception
(
"Configuration"
) <<
" ERROR: I need 1 "
<<
s
<<
" tags"
;
24
}
25
return
temp
[0];
26
}
27
return
"NotFound"
;
28
}
29
30
template
<>
31
std::string
ExtractStringFromDDD<cms::DDFilteredView>::getString
(
const
std::string
&
s
,
cms::DDFilteredView
*fv) {
32
auto
result
= fv->
getString
(
s
);
33
return
{
result
.data(),
result
.size()};
34
}
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
DDValue
Definition:
DDValue.h:22
Exception
Definition:
hltDiff.cc:245
MessageLogger.h
mps_fire.result
result
Definition:
mps_fire.py:311
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
groupFilesInBlocks.temp
list temp
Definition:
groupFilesInBlocks.py:142
cms::DDFilteredView::getString
std::string_view getString(const std::string &) const
Definition:
DDFilteredView.cc:630
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition:
DDsvalues.cc:79
DDFilteredView
Definition:
DDFilteredView.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
cms::DDFilteredView
Definition:
DDFilteredView.h:70
DDFilteredView::specificsV
void specificsV(std::vector< const DDsvalues_type *> &result) const
User specific data attached to the current node.
Definition:
DDFilteredView.cc:38
DDFilteredView.h
ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it
auto & it
Definition:
splitVertices.h:28
ExtractStringFromDDD.h
DDFilteredView.h
heppy_batch.val
val
Definition:
heppy_batch.py:351
Generated for CMSSW Reference Manual by
1.8.14