CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLElementaryMaterial.cc
Go to the documentation of this file.
2 
3 #include <map>
4 #include <utility>
5 
11 
12 class DDCompactView;
13 
15  : DDLMaterial( myreg )
16 {}
17 
18 void
20 {
23 
24  DDMaterial mat = DDMaterial( getDDName( nmspace ),
25  ev.eval( nmspace, atts.find( "atomicNumber" )->second ),
26  ev.eval( nmspace, atts.find( "atomicWeight" )->second ),
27  ev.eval( nmspace, atts.find( "density" )->second ));
28 
29  DDLMaterial::setReference( nmspace, cpv );
30  clear();
31 }
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 &quot;row&quot; of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:73
bool ev
type of data representation of DDCompactView
Definition: DDCompactView.h:90
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:17
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:55
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:80