DDLEllipsoid processes all Ellipsoid elements. More...
#include <DDLEllipsoid.h>
Public Member Functions | |
DDLEllipsoid (DDLElementRegistry *myreg) | |
Constructor. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLEllipsoid (void) | |
Destructor. |
DDLEllipsoid processes all Ellipsoid elements.
DDLEllipsoid.h - description ------------------- begin: Mon Oct 29 2001 email: case@ucdhep.ucdavis.edu
This processes DDL Ellipsoid elements.
Definition at line 24 of file DDLEllipsoid.h.
DDLEllipsoid::DDLEllipsoid | ( | DDLElementRegistry * | myreg | ) |
DDLEllipsoid::~DDLEllipsoid | ( | void | ) |
void DDLEllipsoid::processElement | ( | const std::string & | name, |
const std::string & | nmspace, | ||
DDCompactView & | cpv | ||
) | [virtual] |
Processing the element.
The processElement method completes any necessary work to process the XML element.
For example, this can be used to call the DDCore to make the geometry in memory. There is a default for this so that if not declared in the inheriting class, no processing is done.
Reimplemented from DDXMLElement.
Definition at line 31 of file DDLEllipsoid.cc.
References DCOUT_V, DDSolidFactory::ellipsoid(), ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), instance, and DDLSolid::setReference().
{ DCOUT_V( 'P', "DDLEllipsoid::processElement started" ); ExprEvalInterface & ev = ExprEvalSingleton::instance(); DDXMLAttribute atts = getAttributeSet(); double zbot(0.), ztop(0.); if( atts.find( "zBottomCut" ) != atts.end() ) { zbot = ev.eval( nmspace, atts.find( "zBottomCut" )->second ); } if( atts.find( "zTopCut" ) != atts.end() ) { ztop = ev.eval( nmspace, atts.find( "zTopCut" )->second ); } DDSolid ddel = DDSolidFactory::ellipsoid( getDDName( nmspace ), ev.eval(nmspace, atts.find("xSemiAxis")->second), ev.eval(nmspace, atts.find("ySemiAxis")->second), ev.eval(nmspace, atts.find("zSemiAxis")->second), zbot, ztop ); DDLSolid::setReference( nmspace, cpv ); DCOUT_V( 'P', "DDLEllipsoid::processElement completed" ); }