diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp index 37504865c21e551c49e5cd208cddb786e6d12922..b0196cd7cd980be0c269345dd3ebc267d3d7639f 100644 --- a/DDCore/src/plugins/Compact2Objects.cpp +++ b/DDCore/src/plugins/Compact2Objects.cpp @@ -556,6 +556,19 @@ template <> void Converter<Readout>::operator()(xml_h e) const { p->setValue(_toString(seg.attr<int>(Unicode(p->name())))); } else if (pType.compare("float") == 0) { p->setValue(_toString(seg.attr<float>(Unicode(p->name())))); + } else if (pType.compare("doublevec") == 0) { + std::string theString = seg.attr<string>(Unicode(p->name())); + printout(DEBUG, "Compact", "++ Converting this string structure: %s.", theString.c_str()); + // need to put things back to a string, because we can only set segmentation values via string + std::stringstream theValueString; + std::vector<std::string> elements = DD4hep::DDSegmentation::splitString(theString); + for (std::vector<std::string>::const_iterator it = elements.begin(); it != elements.end(); ++it) { + if (it->empty()) continue; + double theDouble = DD4hep::Geometry::_toDouble((*it)); + theValueString << " " << theDouble; + } + printout(DEBUG, "Compact", "++ Converted this string structure: %s.", theValueString.str().c_str()); + p->setValue(theValueString.str()); } else if (pType.compare("double") == 0) { p->setValue(_toString(seg.attr<double>(Unicode(p->name())))); } else {