4 #include <ext/alloc_traits.h>
31 std::vector<DDPartSelRegExpLevel> regv;
32 std::vector<DDPartSelection>
temp;
36 throw cms::Exception(
"DDException") <<
"Could not evaluate the selection-std::string ->" << selString <<
"<-";
38 std::pair<bool, std::string>
res;
39 for (
const auto& it : regv) {
40 std::vector<DDLogicalPart> lpv;
43 std::string msg(
"Could not process q-name of a DDLogicalPart, reason:\n" +
res.second);
44 msg +=
"\nSpecPar selection is:\n" + selString +
"\n";
53 for (
const auto& iit :
temp) {
62 std::vector<DDPartSelection>& selv) {
68 ps_sizetype ps_sz = selv.size();
69 lpv_sizetype lpv_sz = lpv.size();
70 lpv_sizetype lpv_i = 0;
71 std::vector<DDPartSelection>
result;
72 for (; lpv_i < lpv_sz; ++lpv_i) {
73 std::vector<DDPartSelection>::const_iterator ps_it = selv.begin();
74 for (; ps_it != selv.end(); ++ps_it) {
75 result.emplace_back(*ps_it);
79 for (lpv_i = 0; lpv_i < lpv_sz; ++lpv_i) {
80 for (ps_i = ps_sz * lpv_i; ps_i < ps_sz * (lpv_i + 1); ++ps_i) {
90 os <<
" Size: " <<
specifics_.size() << std::endl;
91 os <<
"\tSelections:" << std::endl;
93 os << pit << std::endl;
97 os <<
"\tParameter name= \"" <<
v.name() <<
"\" " << std::endl;
98 os <<
"\t\t Value pairs: " << std::endl;
101 if (
v.isEvaluated()) {
103 os <<
"\t\t\t\"" <<
v[
i].first <<
"\""
104 <<
", " <<
v[
i].second << std::endl;
107 for (
const auto&
i :
v.strings()) {
108 os <<
"\t\t\t\"" <<
i <<
"\""
109 <<
", not evaluated" << std::endl;
116 std::vector<std::pair<
DDLogicalPart, std::pair<const DDPartSelection*, const DDsvalues_type*> > >&
result)
const {
124 std::pair<const DDPartSelection*, const DDsvalues_type*> pssv(ps,
sv);
125 result.emplace_back(std::make_pair(logp, pssv));
143 edm::LogError(
"Specific") <<
" >> more or less than one part-selector, currently NOT SUPPORTED! <<" << std::endl;
144 return std::make_pair(
false,
e);
148 DDPartSelection::const_iterator it = ps.begin();
149 DDPartSelection::const_iterator ed = ps.end();
150 if ((it != ed) && (it->selectionType_ !=
ddanyposp)) {
151 edm::LogError(
"Specific") <<
" >> part-selector must start with //Name[no] ! << " << std::endl;
152 return std::make_pair(
false,
e);
155 for (; it != ps.end(); ++it) {
157 edm::LogError(
"Specific") <<
" >> part-selector must be a concatenation of direct children\n"
158 <<
" including their copy-number only, CURRENT LIMITATION! <<" << std::endl;
159 return std::make_pair(
false,
e);
165 for (; it != ed; ++it) {
167 if ((it->copyno_ ==
e.copyno()) && (it->lp_ ==
e.logicalPart())) {
177 return std::make_pair(
result,
e);