Main Page
Namespaces
Classes
Package Documentation
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 "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include <vector>
5
#include <string>
6
7
using namespace
cms
;
8
9
std::string
ExtractStringFromDDD::getString
(
std::string
const
&
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)
break
;
18
}
19
if
(foundIt) {
20
std::vector<std::string>
const
&
temp
=
val
.strings();
21
if
(temp.size() != 1) {
22
throw
cms::Exception
(
"Configuration"
)<<
" ERROR: I need 1 "
<< s <<
" tags"
;
23
}
24
return
temp[0];
25
}
26
return
"NotFound"
;
27
}
MessageLogger.h
DDValue
Definition:
DDValue.h:21
Exception
Definition:
hltDiff.cc:292
mps_fire.result
result
Definition:
mps_fire.py:291
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
groupFilesInBlocks.temp
temp
Definition:
groupFilesInBlocks.py:142
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition:
DDsvalues.cc:81
cms::DDFilteredView
Definition:
DDFilteredView.h:39
ExtractStringFromDDD::getString
static std::string getString(std::string const &, DDFilteredView *)
ExtractStringFromDDD.h
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
DDFilteredView.h
heppy_batch.val
val
Definition:
heppy_batch.py:351
Generated for CMSSW Reference Manual by
1.8.11