CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DDLBox.cc
Go to the documentation of this file.
7 
8 #include <map>
9 #include <utility>
10 
11 class DDCompactView;
12 
14 
15 // Upon ending a Box element, call DDCore giving the box name, and dimensions.
16 void DDLBox::processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) {
19 
20  DDName ddname = getDDName(nmspace);
22  ev.eval(nmspace, atts.find("dx")->second),
23  ev.eval(nmspace, atts.find("dy")->second),
24  ev.eval(nmspace, atts.find("dz")->second));
25  // Attempt to make sure Solid elements can be in LogicalPart elements.
26  DDLSolid::setReference(nmspace, cpv);
27 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:173
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a &quot;row&quot; of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:54
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ClhepEvaluator & evaluator()
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLBox.cc:16
DDLBox(DDLElementRegistry *myreg)
Definition: DDLBox.cc:13
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:547
DDLSolid processes Box elements.
Definition: DDLSolid.h:30
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:56
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:13