CMS 3D CMS Logo

DDLBox.cc
Go to the documentation of this file.
2 
3 #include <map>
4 #include <utility>
5 
11 
12 class DDCompactView;
13 
15  : DDLSolid( myreg )
16 {}
17 
18 // Upon ending a Box element, call DDCore giving the box name, and dimensions.
19 void
21 {
24 
25  DDName ddname = getDDName( nmspace );
27  ev.eval( nmspace, atts.find( "dx" )->second ),
28  ev.eval( nmspace, atts.find( "dy" )->second ),
29  ev.eval( nmspace, atts.find( "dz" )->second ));
30  // Attempt to make sure Solid elements can be in LogicalPart elements.
31  DDLSolid::setReference( nmspace, cpv );
32 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:73
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
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()
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLBox.cc:20
DDLBox(DDLElementRegistry *myreg)
Definition: DDLBox.cc:14
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:816
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:80
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:17