test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLBox.cc
Go to the documentation of this file.
1 /***************************************************************************
2  DDLBox.cc - description
3  -------------------
4  begin : Wed Oct 24 2001
5  email : case@ucdhep.ucdavis.edu
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * DDDParser sub-component of DDD *
11  * *
12  ***************************************************************************/
13 
15 
19 
21 
23  : DDLSolid( myreg )
24 {}
25 
27 {}
28 
29 // Upon ending a Box element, call DDCore giving the box name, and dimensions.
30 void
32 {
33  DCOUT_V( 'P', "DDLBox::processElement started" );
34 
37 
38  DDName ddname = getDDName( nmspace );
40  ev.eval( nmspace, atts.find( "dx" )->second ),
41  ev.eval( nmspace, atts.find( "dy" )->second ),
42  ev.eval( nmspace, atts.find( "dz" )->second ));
43  // Attempt to make sure Solid elements can be in LogicalPart elements.
44  DDLSolid::setReference( nmspace, cpv );
45 
46  DCOUT_V( 'P', "DDLBox::processElement completed" );
47 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:186
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
bool ev
type of data representation of DDCompactView
Definition: DDCompactView.h:77
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:55
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
ClhepEvaluator & evaluator()
DDLBox(DDLElementRegistry *myreg)
Constructor.
Definition: DDLBox.cc:22
~DDLBox()
Destructor.
Definition: DDLBox.cc:26
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:519
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
DDLSolid processes Box elements.
Definition: DDLSolid.h:27
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
Definition: DDLBox.cc:31
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:86
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:26