File indexing completed on 2023-03-17 10:51:50
0001 #include "DetectorDescription/Parser/src/DDLNumeric.h"
0002 #include "DetectorDescription/Core/interface/DDConstant.h"
0003 #include "DetectorDescription/Core/interface/ClhepEvaluator.h"
0004 #include "DetectorDescription/Parser/interface/DDLElementRegistry.h"
0005 #include "DetectorDescription/Parser/src/DDXMLElement.h"
0006
0007 #include <map>
0008 #include <utility>
0009
0010 class DDCompactView;
0011
0012 DDLNumeric::DDLNumeric(DDLElementRegistry* myreg) : DDXMLElement(myreg) {}
0013
0014 void DDLNumeric::preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) {}
0015
0016 void DDLNumeric::processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) {
0017 if (parent() == "ConstantsSection" || parent() == "DDDefinition") {
0018 DDNumeric ddnum(
0019 getDDName(nmspace),
0020 std::make_unique<double>(myRegistry_->evaluator().eval(nmspace, getAttributeSet().find("value")->second)));
0021 clear();
0022 }
0023 }