CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLPseudoTrap.cc
Go to the documentation of this file.
1 /***************************************************************************
2  DDLPseudoTrap.cc - description
3  -------------------
4  begin : Mon Jul 17 2003
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 encountering an end of the tag, call DDCore's Trap.
30 void
32 {
33  DCOUT_V('P', "DDLPseudoTrap::processElement started");
34 
37 
38  DDSolid myTrap = DDSolidFactory::pseudoTrap( getDDName(nmspace),
39  ev.eval(nmspace, atts.find("dx1")->second),
40  ev.eval(nmspace, atts.find("dx2")->second),
41  ev.eval(nmspace, atts.find("dy1")->second),
42  ev.eval(nmspace, atts.find("dy2")->second),
43  ev.eval(nmspace, atts.find("dz")->second),
44  ev.eval(nmspace, atts.find("radius")->second),
45  (atts.find("atMinusZ")->second == "true") ? true : false );
46 
47  DDLSolid::setReference(nmspace, cpv);
48 
49  DCOUT_V('P', "DDLPseudoTrap::processElement completed");
50 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:186
static DDSolid pseudoTrap(const DDName &name, double pDx1, double pDx2, double pDy1, double pDy2, double pDz, double radius, bool atMinusZ)
Definition: DDSolid.cc:737
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
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
~DDLPseudoTrap(void)
Destructor.
ClhepEvaluator & evaluator()
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
DDLPseudoTrap(DDLElementRegistry *myreg)
Constructor.
DDLSolid processes Box elements.
Definition: DDLSolid.h:27
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