CMS 3D CMS Logo

DDLElementaryMaterial.cc
Go to the documentation of this file.
7 
8 #include <map>
9 #include <utility>
10 
11 class DDCompactView;
12 
14  : DDLMaterial( myreg )
15 {}
16 
17 void
19 {
22 
23  DDMaterial mat = DDMaterial( getDDName( nmspace ),
24  ev.eval( nmspace, atts.find( "atomicNumber" )->second ),
25  ev.eval( nmspace, atts.find( "atomicWeight" )->second ),
26  ev.eval( nmspace, atts.find( "density" )->second ));
27 
28  DDLMaterial::setReference( nmspace, cpv );
29  clear();
30 }
DDLMaterial processes Box elements.
Definition: DDLMaterial.h:29
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:72
bool ev
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
ClhepEvaluator & evaluator()
virtual void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLMaterial.cc:16
DDLElementaryMaterial(DDLElementRegistry *myreg)
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual void clear(void)
clear this element&#39;s contents.
Definition: DDXMLElement.cc:54
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:79