CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLEllipsoid.cc
Go to the documentation of this file.
1 /***************************************************************************
2  DDLEllipsoid.cc - description
3  -------------------
4  begin : Thu Aug 19 2010
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 the end of the Ellipsoid element, call DDCore.
30 void
32 {
33  DCOUT_V( 'P', "DDLEllipsoid::processElement started" );
36  double zbot(0.), ztop(0.);
37  if( atts.find( "zBottomCut" ) != atts.end() )
38  {
39  zbot = ev.eval( nmspace, atts.find( "zBottomCut" )->second );
40  }
41  if( atts.find( "zTopCut" ) != atts.end() )
42  {
43  ztop = ev.eval( nmspace, atts.find( "zTopCut" )->second );
44  }
45  DDSolid ddel = DDSolidFactory::ellipsoid( getDDName( nmspace ),
46  ev.eval(nmspace, atts.find("xSemiAxis")->second),
47  ev.eval(nmspace, atts.find("ySemiAxis")->second),
48  ev.eval(nmspace, atts.find("zSemiAxis")->second),
49  zbot,
50  ztop );
51  DDLSolid::setReference( nmspace, cpv );
52 
53  DCOUT_V( 'P', "DDLEllipsoid::processElement completed" );
54 }
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
DDLEllipsoid(DDLElementRegistry *myreg)
Constructor.
Definition: DDLEllipsoid.cc:22
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
static value_type & instance()
Interface of an Expression Evaluator.
static DDSolid ellipsoid(const DDName &name, double xSemiAxis, double ySemiAxis, double zSemiAxis, double zBottomCut=0., double zTopCut=0.)
Definition: DDSolid.cc:821
~DDLEllipsoid(void)
Destructor.
Definition: DDLEllipsoid.cc:26
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
DDLSolid processes Box elements.
Definition: DDLSolid.h:27
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
Definition: DDLEllipsoid.cc:31
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