#include <DDLTorus.h>
Public Member Functions | |
DDLTorus (DDLElementRegistry *myreg) | |
Constructor. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLTorus (void) | |
Destructor. |
DDLTorus.h - description ------------------- begin: Fri May 25 2007 email: case@ucdhep.ucdavis.edu
Torus, same as G4Torus
Definition at line 23 of file DDLTorus.h.
DDLTorus::DDLTorus | ( | DDLElementRegistry * | myreg | ) |
DDLTorus::~DDLTorus | ( | void | ) |
void DDLTorus::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 32 of file DDLTorus.cc.
References DCOUT_V, ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), DDLSolid::setReference(), and DDSolidFactory::torus().
{ DCOUT_V('P', "DDLTorus::processElement started"); ExprEvalInterface & ev = ExprEvalSingleton::instance(); DDXMLAttribute atts = getAttributeSet(); DDSolid myTorus = DDSolidFactory::torus( getDDName(nmspace), ev.eval(nmspace, atts.find("innerRadius")->second), ev.eval(nmspace, atts.find("outerRadius")->second), ev.eval(nmspace, atts.find("torusRadius")->second), ev.eval(nmspace, atts.find("startPhi")->second), ev.eval(nmspace, atts.find("deltaPhi")->second)); DDLSolid::setReference( nmspace, cpv ); DCOUT_V('P', "DDLTorus::processElement completed"); }