41 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
42 em +=
" The solid of the parent logical part MUST be defined before the Division is made.";
44 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
50 if (atts.find(
"nReplicas") != atts.end() && atts.find(
"width") != atts.end() && atts.find(
"offset") != atts.end()) {
54 int(ev.
eval(nmspace, atts.find(
"nReplicas")->second)),
55 ev.
eval(nmspace, atts.find(
"width")->second),
56 ev.
eval(nmspace, atts.find(
"offset")->second));
57 }
else if (atts.find(
"nReplicas") != atts.end() && atts.find(
"offset") != atts.end()) {
61 int(ev.
eval(nmspace, atts.find(
"nReplicas")->second)),
62 ev.
eval(nmspace, atts.find(
"offset")->second));
63 }
else if (atts.find(
"width") != atts.end() && atts.find(
"offset") != atts.end()) {
67 ev.
eval(nmspace, atts.find(
"width")->second),
68 ev.
eval(nmspace, atts.find(
"offset")->second));
70 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
71 em +=
" Allowed combinations are attributes width&offset OR nReplicas&offset OR nReplicas&width&offset.";
73 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
200 std::string s =
"ERROR: A Polycone or Polyhedra can not be divided on any axis if it's\n";
201 s +=
"original definition used r and z instead of ZSections. This has\n";
202 s +=
"not (yet) been implemented.";
216 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.
Compact representation of the geometrical detector hierarchy.
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.
static const std::string name(const DDAxes &s)
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.
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.