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 namespace rotation_utils {
20 using DDVectorsMap = std::unordered_map<std::string, std::vector<double>>;
40 T attr(xml_elt_t element,
const xml_tag_t&
name)
const {
42 element.setAttr(name, val);
43 return element.attr<
T>(
name);
47 T attr(xml_elt_t element,
const xml_tag_t&
name,
T defaultValue)
const {
48 if (element.hasAttr(name)) {
50 element.setAttr(name, val);
51 return element.attr<
T>(
name);
92 #define NAMESPACE_SEP ':'
dd4hep::Solid addSolidNS(const std::string &name, dd4hep::Solid solid) const
std::unordered_map< std::string, std::vector< double >> DDVectorsMap
std::string rotHash(const Double_t *rot)
dd4hep::Volume volume(const std::string &name, bool exc=true) const
dd4hep::Volume addVolumeNS(dd4hep::Volume vol) const
dd4hep::Assembly addAssembly(dd4hep::Assembly asmb, bool addSolid=true) const
dd4hep::Volume addVolume(dd4hep::Volume vol) const
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
std::string noNamespace(const std::string &) const
static std::string objName(const std::string &)
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
double roundBinary(double value)
dd4hep::Solid addSolid(const std::string &name, dd4hep::Solid solid) const
std::vector< float > vecFloat(const std::string &name) const
dd4hep::Assembly addAssemblySolid(dd4hep::Assembly assembly) const
const dd4hep::Rotation3D & rotation(const std::string &name) const
dd4hep::Assembly assembly(const std::string &name, bool exception=true) const
void addConstant(const std::string &name, const std::string &value, const std::string &type) const
DDParsingContext * setContext()