DDLMaterial processes Box elements. More...
#include <DDLMaterial.h>
Public Member Functions | |
DDLMaterial (DDLElementRegistry *myreg) | |
Constructor. | |
virtual void | setReference (const std::string &nmspace, DDCompactView &cpv) |
virtual | ~DDLMaterial (void) |
Destructor. |
DDLMaterial processes Box elements.
DDLMaterial.h - description ------------------- begin: Fri Oct 04 2002 email: case@ucdhep.ucdavis.edu
This class currently serves one purpose only. That is to create a reference to the most recently created Material, no matter whether it is an ElementaryMaterial or CompositeMaterial.
Definition at line 26 of file DDLMaterial.h.
DDLMaterial::DDLMaterial | ( | DDLElementRegistry * | myreg | ) |
DDLMaterial::~DDLMaterial | ( | void | ) | [virtual] |
void DDLMaterial::setReference | ( | const std::string & | nmspace, |
DDCompactView & | cpv | ||
) | [virtual] |
Definition at line 26 of file DDLMaterial.cc.
References DDXMLElement::clear(), DCOUT_V, DDXMLElement::getAttributeSet(), DDLElementRegistry::getElement(), DDXMLElement::loadAttributes(), DDXMLElement::myRegistry_, h::names, DDXMLElement::size(), and makeHLTPrescaleTable::values.
Referenced by DDLCompositeMaterial::processElement(), and DDLElementaryMaterial::processElement().
{ // in case it there were any rMaterials myRegistry_->getElement("rMaterial")->clear(); // Attempt to make sure Material elements can be in LogicalPart elements. if (myRegistry_->getElement("LogicalPart")->size() > 0) { DDXMLElement* refmat = myRegistry_->getElement("rMaterial"); std::vector<std::string> names; std::vector<std::string> values; names.push_back("name"); DDXMLAttribute atts = getAttributeSet(); values.push_back(atts.find("name")->second); refmat->loadAttributes("rMaterial", names, values, nmspace, cpv); } // clear THIS material's values. clear(); DCOUT_V('P', "DDLMaterial::setReference completed"); }