DDLSphere processes all Sphere elements. More...
#include <DDLSphere.h>
Public Member Functions | |
DDLSphere (DDLElementRegistry *myreg) | |
Constructor. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLSphere (void) | |
Destructor. |
DDLSphere processes all Sphere elements.
DDLSphere.h - description ------------------- begin: Mon Oct 29 2001 email: case@ucdhep.ucdavis.edu
This processes DDL Sphere and Cons elements.
Definition at line 24 of file DDLSphere.h.
DDLSphere::DDLSphere | ( | DDLElementRegistry * | myreg | ) |
DDLSphere::~DDLSphere | ( | void | ) |
void DDLSphere::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 DDLSphere.cc.
References DCOUT_V, ddsphere, ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), DDLSolid::setReference(), and DDSolidFactory::sphere().
{ DCOUT_V('P', "DDLSphere::processElement started"); ExprEvalInterface & ev = ExprEvalSingleton::instance(); DDXMLAttribute atts = getAttributeSet(); DDSolid ddsphere = DDSolidFactory::sphere( getDDName(nmspace), ev.eval(nmspace, atts.find("innerRadius")->second), ev.eval(nmspace, atts.find("outerRadius")->second), ev.eval(nmspace, atts.find("startPhi")->second), ev.eval(nmspace, atts.find("deltaPhi")->second), ev.eval(nmspace, atts.find("startTheta")->second), ev.eval(nmspace, atts.find("deltaTheta")->second )); DDLSolid::setReference(nmspace, cpv); DCOUT_V('P', "DDLSphere::processElement completed"); }