#include <Geometry/TrackerNumberingBuilder/plugins/ExtractStringFromDDD.h>
Static Public Member Functions | |
static std::string | getString (std::string const &, DDFilteredView *) |
Definition at line 14 of file ExtractStringFromDDD.h.
std::string ExtractStringFromDDD::getString | ( | std::string const & | s, | |
DDFilteredView * | fv | |||
) | [static] |
Definition at line 9 of file ExtractStringFromDDD.cc.
References DDfetch(), Exception, it, HLT_VtxMuL3::result, DDFilteredView::specificsV(), DDValue::strings(), and pyDBSRunClass::temp.
Referenced by CmsTrackerPetalBuilder::buildComponent(), CmsTrackerBuilder::buildComponent(), CmsTrackerWheelBuilder::buildComponent(), CmsTrackerSubStrctBuilder::buildComponent(), CmsTrackerLayerBuilder::buildComponent(), CmsDetConstruction::buildComponent(), CmsTrackerDiskBuilder::buildComponent(), CmsTrackerPanelBuilder::buildComponent(), CmsDetConstruction::buildSmallDets(), DDDCmsTrackerContruction::construct(), and CmsTrackerRingBuilder::sortNS().
00009 { 00010 DDValue val(s); 00011 std::vector<const DDsvalues_type *> result; 00012 fv->specificsV(result); 00013 std::vector<const DDsvalues_type *>::iterator it = result.begin(); 00014 bool foundIt = false; 00015 for (; it != result.end(); ++it) { 00016 foundIt = DDfetch(*it,val); 00017 if (foundIt) break; 00018 } 00019 if (foundIt) { 00020 std::vector<std::string> const & temp = val.strings(); 00021 if (temp.size() != 1) { 00022 throw cms::Exception("Configuration")<< " ERROR: I need 1 "<< s << " tags"; 00023 } 00024 return temp[0]; 00025 } 00026 return "NotFound"; 00027 }