CMS 3D CMS Logo

DDLPseudoTrap.cc
Go to the documentation of this file.
7 
8 #include <map>
9 #include <utility>
10 
11 class DDCompactView;
12 
14  : DDLSolid( myreg )
15 {}
16 
17 // Upon encountering an end of the tag, call DDCore's Trap.
18 void
20 {
23 
24  DDSolid myTrap = DDSolidFactory::pseudoTrap( getDDName(nmspace),
25  ev.eval(nmspace, atts.find("dx1")->second),
26  ev.eval(nmspace, atts.find("dx2")->second),
27  ev.eval(nmspace, atts.find("dy1")->second),
28  ev.eval(nmspace, atts.find("dy2")->second),
29  ev.eval(nmspace, atts.find("dz")->second),
30  ev.eval(nmspace, atts.find("radius")->second),
31  (atts.find("atMinusZ")->second == "true") ? true : false );
32 
33  DDLSolid::setReference(nmspace, cpv);
34 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
static DDSolid pseudoTrap(const DDName &name, double pDx1, double pDx2, double pDy1, double pDy2, double pDz, double radius, bool atMinusZ)
Definition: DDSolid.cc:931
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:72
bool ev
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
A DDSolid represents the shape of a part.
Definition: DDSolid.h:38
ClhepEvaluator & evaluator()
DDLPseudoTrap(DDLElementRegistry *myreg)
DDLSolid processes Box elements.
Definition: DDLSolid.h:30
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
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)
Definition: DDXMLElement.cc:79
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:16