/DetectorDescription/Parser/src/DDLNumeric.cc
https://github.com/aivanov-cern/cmssw · C++ · 37 lines · 22 code · 9 blank · 6 comment · 4 complexity · 7f727cc4b358283c8087cb31f53a4f32 MD5 · raw file
- /***************************************************************************
- DDLNumeric.cc - description
- -------------------
- begin : Friday Nov. 21, 2003
- email : case@ucdhep.ucdavis.edu
- ***************************************************************************/
- #include "DetectorDescription/Parser/src/DDLNumeric.h"
- #include "DetectorDescription/Base/interface/DDdebug.h"
- #include "DetectorDescription/ExprAlgo/interface/ClhepEvaluator.h"
- DDLNumeric::DDLNumeric( DDLElementRegistry* myreg )
- : DDXMLElement( myreg )
- {}
- DDLNumeric::~DDLNumeric( void )
- {}
-
- void
- DDLNumeric::preProcessElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
- {}
- void
- DDLNumeric::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
- {
- DCOUT_V( 'P', "DDLNumeric::processElement started" );
- if( parent() == "ConstantsSection" || parent() == "DDDefinition" )
- {
- DDNumeric ddnum( getDDName( nmspace ), new double( myRegistry_->evaluator().eval( nmspace, getAttributeSet().find( "value" )->second )));
- clear();
- } // else, save it, don't clear it, because some other element (parent node) will use it.
- DCOUT_V( 'P', "DDLNumeric::processElement completed" );
- }