Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "DetectorDescription/Parser/src/DDLElementaryMaterial.h"
00015
00016 #include "DetectorDescription/Core/interface/DDName.h"
00017 #include "DetectorDescription/Base/interface/DDdebug.h"
00018 #include "DetectorDescription/Core/interface/DDMaterial.h"
00019
00020 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
00021
00022 #include <iostream>
00023
00024 DDLElementaryMaterial::DDLElementaryMaterial( DDLElementRegistry* myreg )
00025 : DDLMaterial( myreg )
00026 {}
00027
00028 DDLElementaryMaterial::~DDLElementaryMaterial( void )
00029 {}
00030
00031
00032 void
00033 DDLElementaryMaterial::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00034 {
00035 DCOUT_V( 'P', "DDLElementaryMaterial::processElement started" );
00036
00037 ExprEvalInterface & ev = ExprEvalSingleton::instance();
00038 DDXMLAttribute atts = getAttributeSet();
00039
00040 DDMaterial mat = DDMaterial( getDDName( nmspace ),
00041 ev.eval( nmspace, atts.find( "atomicNumber" )->second ),
00042 ev.eval( nmspace, atts.find( "atomicWeight" )->second ),
00043 ev.eval( nmspace, atts.find( "density" )->second ));
00044
00045 DDLMaterial::setReference( nmspace, cpv );
00046 clear();
00047
00048 DCOUT_V( 'P', "DDLElementaryMaterial::processElement completed." );
00049 }