|
|
Go to the documentation of this file.
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.";
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.";
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 ";
const std::string & parent(void) const
access to parent element name
virtual void clear(void)
clear this element's contents.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
DDName is used to identify DDD entities uniquely.
def_type isDefined() const
The main class for processing parsed elements.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
ClhepEvaluator & evaluator()
virtual void execute(void)
DDSolidShape shape(void) const
The type of the solid.
Compact representation of the geometrical detector hierarchy.
DDDividedGeometryObject * makeDivider(const DDDivision &div, DDCompactView *cpv)
std::map< std::string, std::string > DDXMLAttribute
static const char *const name(DDSolidShape s)
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
This is a base class for processing XML elements in the DDD.
const std::string & name() const
Returns the name.
const virtual DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
const std::string & ns() const
Returns the namespace.
DDLElementRegistry * myRegistry_
DDLDivision(DDLElementRegistry *myreg)
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
static const std::string name(const DDAxes &s)
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
const DDLogicalPart & parent() const