45 DCOUT_V(
'P',
"DDLDivision::processElement started");
58 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
59 em +=
" The solid of the parent logical part MUST be defined before the Division is made.";
61 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
67 if (atts.find(
"nReplicas") != atts.end()
68 && atts.find(
"width") != atts.end()
69 && atts.find(
"offset") != atts.end())
74 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
75 , ev.
eval(nmspace, atts.find(
"width")->second)
76 , ev.
eval(nmspace, atts.find(
"offset")->second));
78 else if (atts.find(
"nReplicas") != atts.end()
79 && atts.find(
"offset") != atts.end())
84 ,
int(ev.
eval(nmspace, atts.find(
"nReplicas")->second))
85 , ev.
eval(nmspace, atts.find(
"offset")->second));
87 else if (atts.find(
"width") != atts.end()
88 && atts.find(
"offset") != atts.end())
90 DCOUT_V (
'D',
" width = " << ev.
eval(nmspace, atts.find(
"width")->second) << std::endl);
91 DCOUT_V (
'D',
" offset = " << ev.
eval(nmspace, atts.find(
"offset")->second) << std::endl);
95 , ev.
eval(nmspace, atts.find(
"width")->second)
96 , ev.
eval(nmspace, atts.find(
"offset")->second));
98 std::string em(
"DetectorDescription Parser DDLDivision::processElement(...) failed.");
99 em +=
" Allowed combinations are attributes width&offset OR nReplicas&offset OR nReplicas&width&offset.";
101 em +=
"\n parent= " + parent.
ns() +
":" + parent.
name();
110 DCOUT_V(
'P',
"DDLDivision::processElement completed");
123 else if (div.
axis() ==
y)
125 else if (div.
axis() ==
z)
143 else if (div.
axis() ==
z)
159 else if (div.
axis() ==
y )
161 else if (div.
axis() ==
z )
180 else if (div.
axis() ==
z)
198 else if (div.
axis() ==
z)
217 else if (div.
axis() ==
z)
233 std::string s =
"ERROR: A Polycone or Polyhedra can not be divided on any axis if it's\n";
234 s +=
"original definition used r and z instead of ZSections. This has\n";
235 s +=
"not (yet) been implemented.";
251 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.
static const std::string name(const DDAxes &s)
#define DCOUT_V(M_v_Y, M_v_S)
This is a base class for processing XML elements in the DDD.
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
~DDLDivision(void)
Destructor.
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)
Constructor.
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 processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.