CMS 3D CMS Logo

DDLNumeric.cc
Go to the documentation of this file.
6 
7 #include <map>
8 #include <utility>
9 
10 class DDCompactView;
11 
13 
15 
17  if (parent() == "ConstantsSection" || parent() == "DDDefinition") {
18  DDNumeric ddnum(
19  getDDName(nmspace),
20  std::make_unique<double>(myRegistry_->evaluator().eval(nmspace, getAttributeSet().find("value")->second)));
21  clear();
22  } // else, save it, don't clear it, because some other element (parent node) will use it.
23 }
DDXMLElement::parent
const std::string & parent(void) const
access to parent element name
Definition: DDXMLElement.cc:201
DDXMLElement::clear
virtual void clear(void)
clear this element's contents.
Definition: DDXMLElement.cc:40
DDLNumeric::DDLNumeric
DDLNumeric(DDLElementRegistry *myreg)
Definition: DDLNumeric.cc:12
ClhepEvaluator.h
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
DDXMLElement::getAttributeSet
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:54
DDLElementRegistry::evaluator
ClhepEvaluator & evaluator()
Definition: DDLElementRegistry.h:42
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
DDLNumeric::preProcessElement
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLNumeric.cc:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLNumeric::processElement
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLNumeric.cc:16
DDXMLElement
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
DDLElementRegistry.h
DDXMLElement::getDDName
const virtual DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:56
DDConstant
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector>
Definition: DDConstant.h:18
DDXMLElement.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDXMLElement::myRegistry_
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:173
ClhepEvaluator::eval
double eval(const std::string &ns, const std::string &expr)
Definition: ClhepEvaluator.cc:85
DDConstant.h
DDLNumeric.h