Go to the documentation of this file. 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"
8 #include <unordered_map>
13 class DDParsingContext;
14 using DDVectorsMap = std::unordered_map<std::string, std::vector<double>>;
34 T attr(xml_elt_t element,
const xml_tag_t&
name)
const {
37 return element.attr<
T>(
name);
41 T attr(xml_elt_t element,
const xml_tag_t&
name,
T defaultValue)
const {
42 if (element.hasAttr(
name)) {
45 return element.attr<
T>(
name);
60 dd4hep::Assembly
addAssembly(dd4hep::Assembly asmb)
const;
85 #define NAMESPACE_SEP ':'
std::string realName(const std::string &) const
DDParsingContext * m_context
void addRotation(const std::string &name, const dd4hep::Rotation3D &rot) const
void addConstant(const std::string &name, const std::string &value, const std::string &type) const
dd4hep::Solid solid(const std::string &name) const
T attr(xml_elt_t element, const xml_tag_t &name) const
dd4hep::Material material(const std::string &name) const
std::string noNamespace(const std::string &) const
std::vector< float > vecFloat(const std::string &name) const
void addConstantNS(const std::string &name, const std::string &value, const std::string &type) const
static std::string objName(const std::string &)
dd4hep::Assembly assembly(const std::string &name) const
std::string prepend(const std::string &) const
dd4hep::Assembly addAssembly(dd4hep::Assembly asmb) const
const dd4hep::Rotation3D & rotation(const std::string &name) const
T attr(xml_elt_t element, const xml_tag_t &name, T defaultValue) const
dd4hep::Volume addVolume(dd4hep::Volume vol) const
Add rotation matrix to current namespace.
dd4hep::Solid addSolidNS(const std::string &name, dd4hep::Solid solid) const
DDNamespace & operator=(const DDNamespace &)=delete
dd4hep::Solid addSolid(const std::string &name, dd4hep::Solid solid) const
dd4hep::Volume addVolumeNS(dd4hep::Volume vol) const
DDParsingContext * setContext()
static std::string nsName(const std::string &)
DDParsingContext *const context() const
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
std::vector< double > vecDbl(const std::string &name) const
std::string_view name() const
dd4hep::Volume volume(const std::string &name, bool exc=true) const
Namespace of DDCMS conversion namespace.