#include <DDLPseudoTrap.h>
Public Member Functions | |
DDLPseudoTrap (DDLElementRegistry *myreg) | |
Constructor. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLPseudoTrap (void) | |
Destructor. |
DDLPseudotrap.h - description ------------------- begin: Mon Jul 14, 2003 email: case@ucdhep.ucdavis.edu
PseudoTrap processor processes PseudoTrap element.
Definition at line 23 of file DDLPseudoTrap.h.
DDLPseudoTrap::DDLPseudoTrap | ( | DDLElementRegistry * | myreg | ) |
DDLPseudoTrap::~DDLPseudoTrap | ( | void | ) |
void DDLPseudoTrap::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 DDLPseudoTrap.cc.
References DCOUT_V, ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), DDSolidFactory::pseudoTrap(), and DDLSolid::setReference().
{ DCOUT_V('P', "DDLPseudoTrap::processElement started"); ExprEvalInterface & ev = ExprEvalSingleton::instance(); DDXMLAttribute atts = getAttributeSet(); DDSolid myTrap = DDSolidFactory::pseudoTrap( getDDName(nmspace), ev.eval(nmspace, atts.find("dx1")->second), ev.eval(nmspace, atts.find("dx2")->second), ev.eval(nmspace, atts.find("dy1")->second), ev.eval(nmspace, atts.find("dy2")->second), ev.eval(nmspace, atts.find("dz")->second), ev.eval(nmspace, atts.find("radius")->second), (atts.find("atMinusZ")->second == "true") ? true : false ); DDLSolid::setReference(nmspace, cpv); DCOUT_V('P', "DDLPseudoTrap::processElement completed"); }