1 #ifndef DetectorDescription_DDCMS_DDCompactView_h
2 #define DetectorDescription_DDCMS_DDCompactView_h
25 #include <DD4hep/SpecParRegistry.h>
59 allSpecParSections.filter(filteredSpecParSections, parameterName);
60 for (
const auto& mySpecParSection : filteredSpecParSections) {
61 if (mySpecParSection.second->hasPath(nodePath)) {
62 return mySpecParSection.second->value<std::vector<T>>(parameterName);
66 return std::vector<T>();
76 const unsigned int parameterValueIndex) {
77 const std::vector<T>& allParameterValues =
78 getAllParameterValuesFromSpecParSections<T>(allSpecParSections, nodePath, parameterName);
79 if (parameterValueIndex < allParameterValues.size()) {
80 return allParameterValues.at(parameterValueIndex);
dd4hep::SpecParRefs DDSpecParRefs
std::vector< T > getAllParameterValuesFromSpecParSections(const cms::DDSpecParRegistry &allSpecParSections, const std::string &nodePath, const std::string ¶meterName)
dd4hep::SpecParRegistry DDSpecParRegistry
const cms::DDDetector & m_det
T getParameterValueFromSpecParSections(const cms::DDSpecParRegistry &allSpecParSections, const std::string &nodePath, const std::string ¶meterName, const unsigned int parameterValueIndex)
DDCompactView(const cms::DDDetector &det)
DDSpecParRegistry const & specpars() const
std::vector< T > getVector(const std::string &) const
dd4hep::SpecParRegistry const & specpars() const
const cms::DDDetector * detector() const