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