1 #ifndef DETECTOR_DESCRIPTION_DD_NAMESPACE_H 2 #define DETECTOR_DESCRIPTION_DD_NAMESPACE_H 5 #include "DD4hep/Objects.h" 6 #include "DD4hep/Shapes.h" 7 #include "DD4hep/Volumes.h" 11 class DDParsingContext;
32 template<
typename T>
T attr( xml_elt_t element,
const xml_tag_t&
name )
const {
34 element.setAttr( name, val );
35 return element.attr<
T>(
name );
38 template<
typename T>
T attr( xml_elt_t element,
const xml_tag_t&
name,
T defaultValue )
const {
39 if( element.hasAttr( name )) {
41 element.setAttr( name, val );
42 return element.attr<
T>(
name );
65 std::string_view
name()
const {
77 #define NAMESPACE_SEP ':' dd4hep::Solid addSolidNS(const std::string &name, dd4hep::Solid solid) const
dd4hep::Volume volume(const std::string &name, bool exc=true) const
dd4hep::Volume addVolumeNS(dd4hep::Volume vol) const
dd4hep::Volume addVolume(dd4hep::Volume vol) const
Add rotation matrix to current namespace.
dd4hep::Solid solid(const std::string &name) const
DDParsingContext *const context() const
std::string_view name() const
void addConstantNS(const std::string &name, const std::string &value, const std::string &type) const
static std::string nsName(const std::string &)
void addRotation(const std::string &name, const dd4hep::Rotation3D &rot) const
std::string realName(const std::string &) const
T attr(xml_elt_t element, const xml_tag_t &name) const
static std::string objName(const std::string &)
dd4hep::Material material(const std::string &name) const
DDNamespace & operator=(const DDNamespace &)=delete
DDParsingContext * m_context
std::string prepend(const std::string &) const
T attr(xml_elt_t element, const xml_tag_t &name, T defaultValue) const
Namespace of DDCMS conversion namespace.
dd4hep::Solid addSolid(const std::string &name, dd4hep::Solid solid) const
const dd4hep::Rotation3D & rotation(const std::string &name) const
void addConstant(const std::string &name, const std::string &value, const std::string &type) const
DDParsingContext * setContext()