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.
1 /***************************************************************************
2  DDLElementaryMaterial.cc - description
3  -------------------
4  begin : Wed Oct 31 2001
5  email : case@ucdhep.ucdavis.edu
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * DDDParser sub-component of DDD *
11  * *
12  ***************************************************************************/
13 
15 
19 
21 
22 #include <iostream>
23 
25  : DDLMaterial( myreg )
26 {}
27 
29 {}
30 
31 // Upon encountering an end of an ElementaryMaterial element, we call DDCore
32 void
34 {
35  DCOUT_V( 'P', "DDLElementaryMaterial::processElement started" );
36 
39 
40  DDMaterial mat = DDMaterial( getDDName( nmspace ),
41  ev.eval( nmspace, atts.find( "atomicNumber" )->second ),
42  ev.eval( nmspace, atts.find( "atomicWeight" )->second ),
43  ev.eval( nmspace, atts.find( "density" )->second ));
44 
45  DDLMaterial::setReference( nmspace, cpv );
46  clear();
47 
48  DCOUT_V( 'P', "DDLElementaryMaterial::processElement completed." );
49 }
DDLMaterial processes Box elements.
Definition: DDLMaterial.h:26
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:186
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a &quot;row&quot; of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:79
bool ev
type of data representation of DDCompactView
Definition: DDCompactView.h:77
~DDLElementaryMaterial(void)
Destructor.
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:55
ClhepEvaluator & evaluator()
virtual void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLMaterial.cc:26
DDLElementaryMaterial(DDLElementRegistry *myreg)
Constructor.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
#define DCOUT_V(M_v_Y, M_v_S)
Definition: DDdebug.h:54
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:61
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:86