49 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
50 em +=
" The solid of the parent logical part MUST be defined before the Division is made.";
52 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
58 if (atts.find(
"nReplicas") != atts.end()
59 && atts.find(
"width") != atts.end()
60 && atts.find(
"offset") != atts.end())
65 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
66 , ev.
eval(nmspace, atts.find(
"width")->second)
67 , ev.
eval(nmspace, atts.find(
"offset")->second));
69 else if (atts.find(
"nReplicas") != atts.end()
70 && atts.find(
"offset") != atts.end())
75 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
76 , ev.
eval(nmspace, atts.find(
"offset")->second));
78 else if (atts.find(
"width") != atts.end()
79 && atts.find(
"offset") != atts.end())
84 , ev.
eval(nmspace, atts.find(
"width")->second)
85 , ev.
eval(nmspace, atts.find(
"offset")->second));
87 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
88 em +=
" Allowed combinations are attributes width&offset OR nReplicas&offset OR nReplicas&width&offset.";
90 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
220 std::string s =
"ERROR: A Polycone or Polyhedra can not be divided on any axis if it's\n";
221 s +=
"original definition used r and z instead of ZSections. This has\n";
222 s +=
"not (yet) been implemented.";
238 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.