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 "tbb/concurrent_unordered_map.h" 9 #include "tbb/concurrent_vector.h" 13 class DDParsingContext;
14 using DDVectorsMap = tbb::concurrent_unordered_map<std::string, tbb::concurrent_vector<double>>;
34 T attr(xml_elt_t element,
const xml_tag_t&
name)
const {
36 element.setAttr(name, val);
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)) {
44 element.setAttr(name, val);
45 return element.attr<
T>(
name);
79 #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 &)
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double >> DDVectorsMap
dd4hep::Material material(const std::string &name) const
DDNamespace & operator=(const DDNamespace &)=delete
std::vector< double > vecDbl(const std::string &name) const
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()