29 if (atts.find(
"phi") != atts.end())
30 phi = ev.
eval(nmspace, atts.find(
"phi")->second);
32 if (atts.find(
"theta") != atts.end())
33 theta = ev.
eval(nmspace, atts.find(
"theta")->second);
35 if (atts.find(
"dy2") != atts.end())
36 dy2 = ev.
eval(nmspace, atts.find(
"dy2")->second);
37 else if (atts.find(
"dy1") != atts.end())
38 dy2 = ev.
eval(nmspace, atts.find(
"dy1")->second);
40 if (name ==
"Trapezoid")
44 ev.
eval(nmspace, atts.find(
"dz")->second),
47 ev.
eval(nmspace, atts.find(
"h1")->second),
48 ev.
eval(nmspace, atts.find(
"bl1")->second),
49 ev.
eval(nmspace, atts.find(
"tl1")->second),
50 ev.
eval(nmspace, atts.find(
"alp1")->second),
51 ev.
eval(nmspace, atts.find(
"h2")->second),
52 ev.
eval(nmspace, atts.find(
"bl2")->second),
53 ev.
eval(nmspace, atts.find(
"tl2")->second),
54 ev.
eval(nmspace, atts.find(
"alp2")->second));
56 else if (name ==
"Trd1")
60 ev.
eval(nmspace, atts.find(
"dz")->second),
63 ev.
eval(nmspace, atts.find(
"dy1")->second),
64 ev.
eval(nmspace, atts.find(
"dx1")->second),
65 ev.
eval(nmspace, atts.find(
"dx1")->second),
68 ev.
eval(nmspace, atts.find(
"dx2")->second),
69 ev.
eval(nmspace, atts.find(
"dx2")->second),
74 std::string msg =
"\nDDLTrapezoid::processElement failed to process element of name: " 76 +
". It can only process Trapezoid and Trd1.";
DDLTrapezoid(DDLElementRegistry *myreg)
DDLElementRegistry * myRegistry_
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Geom::Theta< T > theta() const
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
A DDSolid represents the shape of a part.
ClhepEvaluator & evaluator()
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
DDLSolid processes Box elements.
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
void setReference(const std::string &nmspace, DDCompactView &cpv)