CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/DetectorDescription/Parser/src/DDLNumeric.cc

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLNumeric.cc  -  description
00003                              -------------------
00004     begin                : Friday Nov. 21, 2003
00005     email                : case@ucdhep.ucdavis.edu
00006  ***************************************************************************/
00007 
00008 #include "DetectorDescription/Parser/src/DDLNumeric.h"
00009 
00010 #include "DetectorDescription/Base/interface/DDdebug.h"
00011 #include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
00012 
00013 DDLNumeric::DDLNumeric( DDLElementRegistry* myreg )
00014   : DDXMLElement( myreg )
00015 {}
00016 
00017 DDLNumeric::~DDLNumeric( void )
00018 {}
00019  
00020 void
00021 DDLNumeric::preProcessElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00022 {}
00023 
00024 void
00025 DDLNumeric::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00026 {
00027   DCOUT_V( 'P', "DDLNumeric::processElement started" );
00028 
00029   if( parent() == "ConstantsSection" || parent() == "DDDefinition" )
00030   {
00031     DDNumeric ddnum( getDDName( nmspace ), new double( ExprEvalSingleton::instance().eval( nmspace, getAttributeSet().find( "value" )->second )));
00032     clear();
00033   } // else, save it, don't clear it, because some other element (parent node) will use it.
00034 
00035   DCOUT_V( 'P', "DDLNumeric::processElement completed" );
00036 }
00037