Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:40:18

0001 #include "DetectorDescription/Parser/src/DDLElementaryMaterial.h"
0002 #include "DetectorDescription/Core/interface/DDMaterial.h"
0003 #include "DetectorDescription/Core/interface/ClhepEvaluator.h"
0004 #include "DetectorDescription/Parser/interface/DDLElementRegistry.h"
0005 #include "DetectorDescription/Parser/src/DDLMaterial.h"
0006 #include "DetectorDescription/Parser/src/DDXMLElement.h"
0007 
0008 #include <map>
0009 #include <utility>
0010 
0011 class DDCompactView;
0012 
0013 DDLElementaryMaterial::DDLElementaryMaterial(DDLElementRegistry* myreg) : DDLMaterial(myreg) {}
0014 
0015 void DDLElementaryMaterial::processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) {
0016   ClhepEvaluator& ev = myRegistry_->evaluator();
0017   DDXMLAttribute atts = getAttributeSet();
0018 
0019   DDMaterial mat = DDMaterial(getDDName(nmspace),
0020                               ev.eval(nmspace, atts.find("atomicNumber")->second),
0021                               ev.eval(nmspace, atts.find("atomicWeight")->second),
0022                               ev.eval(nmspace, atts.find("density")->second));
0023 
0024   DDLMaterial::setReference(nmspace, cpv);
0025   clear();
0026 }