52 size_t foundColon= rn.find(
':');
53 if (foundColon != std::string::npos) {
54 ns = rn.substr(0,foundColon);
61 std::vector <std::string> partsels;
86 for (i = 0; i < myPartSelector->size(); ++
i)
87 partsels.emplace_back((myPartSelector->getAttributeSet(i).find(
"path"))->
second);
92 typedef std::map<std::string, std::pair<bool,std::vector<DDValuePair> > > vvvpType;
101 bool doNotEval =
true;
105 const DDXMLAttribute & atts = mySpecParSection->getAttributeSet();
107 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
110 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
117 if (atts.find(
"eval") != atts.end() && atts.find(
"eval")->second ==
"true")
119 else if (atts.find(
"eval") != atts.end())
122 if (atts.find(
"regex") != atts.end() && atts.find(
"regex")->second ==
"false")
124 else if (atts.find(
"regex") != atts.end())
127 for (i = 0; i < myParameter->size(); ++
i)
130 std::vector <DDValuePair> vvp;
131 vvvpType::iterator itv = vvvp.find((atts.find(
"name")->second));
132 if (itv != vvvp.end())
133 vvp = itv->second.second;
135 bool isEvaluated =
false;
146 if ((atts.find(
"eval") != atts.end() && atts.find(
"eval")->second !=
"false")
147 || (atts.find(
"eval") == atts.end() && !doNotEval))
154 vvp.emplace_back(vp);
155 vvvp[atts.find(
"name")->second] = make_pair(isEvaluated,vvp);
159 for (i = 0; i < myString->size(); ++
i)
162 std::vector <DDValuePair> vvp;
163 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
164 if (itv != vvvp.end())
165 vvp = itv->second.second;
168 vvp.emplace_back(vp);
169 vvvp[atts.find(
"name")->second] = make_pair(
false,vvp);
173 for (i = 0; i < myNumeric->size(); ++
i)
176 std::vector <DDValuePair> vvp;
177 vvvpType::iterator itv = vvvp.find(atts.find(
"name")->second);
178 if (itv != vvvp.end())
179 vvp = itv->second.second;
182 vvp.emplace_back(vp);
183 vvvp[atts.find(
"name")->second] = make_pair(
true,vvp);
186 svt.reserve(vvvp.size());
187 for (vvvpType::const_iterator it = vvvp.begin(); it != vvvp.end(); ++it)
190 bool isEvaluated = it->second.first;
194 std::sort(svt.begin(),svt.end());
201 myParameter->clear();
202 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
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void setEvalState(bool newState)
set to true, if the double-values (method DDValue::doubles()) make sense
Compact representation of the geometrical detector hierarchy.
std::map< std::string, std::string > DDXMLAttribute
U second(std::pair< T, U > const &p)
ClhepEvaluator & evaluator()
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.
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
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.