48 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
49 em +=
" The solid of the parent logical part MUST be defined before the Division is made.";
51 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
57 if (atts.find(
"nReplicas") != atts.end()
58 && atts.find(
"width") != atts.end()
59 && atts.find(
"offset") != atts.end())
64 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
65 , ev.
eval(nmspace, atts.find(
"width")->second)
66 , ev.
eval(nmspace, atts.find(
"offset")->second));
68 else if (atts.find(
"nReplicas") != atts.end()
69 && atts.find(
"offset") != atts.end())
74 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
75 , ev.
eval(nmspace, atts.find(
"offset")->second));
77 else if (atts.find(
"width") != atts.end()
78 && atts.find(
"offset") != atts.end())
83 , ev.
eval(nmspace, atts.find(
"width")->second)
84 , ev.
eval(nmspace, atts.find(
"offset")->second));
86 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
87 em +=
" Allowed combinations are attributes width&offset OR nReplicas&offset OR nReplicas&width&offset.";
89 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
219 std::string s =
"ERROR: A Polycone or Polyhedra can not be divided on any axis if it's\n";
220 s +=
"original definition used r and z instead of ZSections. This has\n";
221 s +=
"not (yet) been implemented.";
237 s +=
" at all (yet?). Requested axis was ";
def_type isDefined() const
DDLElementRegistry * myRegistry_
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
const std::string & parent(void) const
access to parent element name
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
DDDividedGeometryObject * makeDivider(const DDDivision &div, DDCompactView *cpv)
static const char *const name(DDSolidShape s)
ClhepEvaluator & evaluator()
virtual void execute(void)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDSolidShape shape(void) const
The type of the solid.
This is a base class for processing XML elements in the DDD.
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
const DDLogicalPart & parent() const
virtual void clear(void)
clear this element's contents.
static const std::string name(const DDAxes &s)
DDLDivision(DDLElementRegistry *myreg)
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
const std::string & name() const
Returns the name.
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.