CMS 3D CMS Logo

ExtractStringFromDDD.cc
Go to the documentation of this file.
5 #include <vector>
6 #include <string>
7 
8 template <>
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 <>
32  auto result = fv->getString(s);
33  return {result.data(), result.size()};
34 }
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
MessageLogger.h
cms::DDFilteredView
Definition: DDFilteredView.h:65
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDFilteredView.h
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
DDFilteredView.h
DDFilteredView::specificsV
void specificsV(std::vector< const DDsvalues_type * > &result) const
User specific data attached to the current node.
Definition: DDFilteredView.cc:38
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::DDFilteredView::getString
std::string_view getString(const std::string &) const
Definition: DDFilteredView.cc:543
ExtractStringFromDDD.h
heppy_batch.val
val
Definition: heppy_batch.py:351
DDValue
Definition: DDValue.h:21
Exception
Definition: hltDiff.cc:246
DDFilteredView
Definition: DDFilteredView.h:20
mps_fire.result
result
Definition: mps_fire.py:303