48 size_t foundColon = rn.find(
':');
49 if (foundColon != std::string::npos) {
50 ns = rn.substr(0, foundColon);
57 std::vector<std::string> partsels;
82 for (
i = 0;
i < myPartSelector->size(); ++
i)
83 partsels.emplace_back((myPartSelector->getAttributeSet(
i).find(
"path"))->
second);
88 typedef std::map<std::string, std::pair<bool, std::vector<DDValuePair> > > vvvpType;
97 bool doNotEval =
true;
103 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
106 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
113 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
115 else if (atts.find(
"eval") != atts.end())
118 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
120 else if (atts.find(
"regex") != atts.end())
123 for (
i = 0;
i < myParameter->size(); ++
i) {
125 std::vector<DDValuePair> vvp;
126 vvvpType::iterator itv = vvvp.find((atts.find(
"name")->second));
127 if (itv != vvvp.end())
128 vvp = itv->second.second;
130 bool isEvaluated =
false;
141 if ((atts.find(
"eval") != atts.end() && atts.find(
"eval")->second !=
"false") ||
142 (atts.find(
"eval") == atts.end() && !doNotEval)) {
148 vvp.emplace_back(vp);
149 vvvp[atts.find(
"name")->second] = make_pair(isEvaluated, vvp);
153 for (
i = 0;
i < myString->size(); ++
i) {
155 std::vector<DDValuePair> vvp;
156 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
157 if (itv != vvvp.end())
158 vvp = itv->second.second;
161 vvp.emplace_back(vp);
162 vvvp[atts.find(
"name")->second] = make_pair(
false, vvp);
166 for (
i = 0;
i < myNumeric->size(); ++
i) {
168 std::vector<DDValuePair> vvp;
169 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
170 if (itv != vvvp.end())
171 vvp = itv->second.second;
174 vvp.emplace_back(vp);
175 vvvp[atts.find(
"name")->second] = make_pair(
true, vvp);
178 svt.reserve(vvvp.size());
179 for (vvvpType::const_iterator it = vvvp.begin(); it != vvvp.end(); ++it) {
181 bool isEvaluated = it->second.first;
182 val.setEvalState(isEvaluated);
189 myParameter->clear();
190 myPartSelector->clear();
DDLSpecPar(DDLElementRegistry *myreg)
DDLElementRegistry * myRegistry_
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
DDsvalues_type::value_type DDsvalues_Content_type
Compact representation of the geometrical detector hierarchy.
std::map< std::string, std::string > DDXMLAttribute
U second(std::pair< T, U > const &p)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
ClhepEvaluator & evaluator()
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
This is a base class for processing XML elements in the DDD.
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Interface to attach user specific data to nodes in the expanded-view.