LDMX Software
|
Given a xml element with several daughters with the same name, e.g. More...
Functions | |
dd4hep::xml::Component | getNodeByStrAttr (const dd4hep::xml::Handle_t &mother, const std::string &nodeName, const std::string &attrName, const std::string &attrValue) |
Retrieves the node component from a mother by the string names. | |
double | getAttrValueWithFallback (const dd4hep::xml::Component &node, const std::string &attrName, const double &defaultValue) |
try to get attribute with double value, return defaultValue if attribute not found | |
Given a xml element with several daughters with the same name, e.g.
<detector> <layer name="1" > <layer name="2"> </detector> this method returns the first daughter of type nodeName whose attribute has a given value e.g. returns <layer name="2"> when called with (detector, "layer", "name", "1")
dd4hep::xml::Component det::utils::getNodeByStrAttr | ( | const dd4hep::xml::Handle_t & | mother, |
const std::string & | nodeName, | ||
const std::string & | attrName, | ||
const std::string & | attrValue ) |
Retrieves the node component from a mother by the string names.
mother | The Handle to the mother volume |
nodeName | The name of the note |
attrName | The name of the Attribute |
attrValue | The attribute value |