4 #include <ext/alloc_traits.h> 28 for(
const auto& it : selections ) {
40 std::vector<DDPartSelRegExpLevel> regv;
41 std::vector<DDPartSelection>
temp;
45 <<
"Could not evaluate the selection-std::string ->" 48 std::pair<bool,std::string>
res;
49 for(
const auto& it : regv ) {
50 std::vector<DDLogicalPart> lpv;
53 std::string msg(
"Could not process q-name of a DDLogicalPart, reason:\n"+res.second);
54 msg+=
"\nSpecPar selection is:\n" + selString +
"\n";
63 for(
const auto& iit : temp ) {
70 std::vector<DDPartSelection> & selv)
77 ps_sizetype ps_sz = selv.size();
78 lpv_sizetype lpv_sz = lpv.size();
79 lpv_sizetype lpv_i = 0;
80 std::vector<DDPartSelection>
result;
81 for (; lpv_i < lpv_sz; ++lpv_i) {
82 std::vector<DDPartSelection>::const_iterator ps_it = selv.begin();
83 for (; ps_it != selv.end(); ++ps_it) {
84 result.emplace_back(*ps_it);
88 for(lpv_i=0; lpv_i < lpv_sz; ++lpv_i) {
89 for(ps_i = ps_sz*lpv_i; ps_i < ps_sz*(lpv_i+1); ++ps_i) {
103 os <<
" Size: " <<
specifics_.size() << std::endl;
104 os <<
"\tSelections:" << std::endl;
106 os << pit << std::endl;
110 os <<
"\tParameter name= \"" << v.
name() <<
"\" " << std::endl;
111 os <<
"\t\t Value pairs: " << std::endl;
116 os <<
"\t\t\t\"" << v[
i].first <<
"\"" <<
", " << v[
i].second << std::endl;
119 for(
const auto& i : v.
strings()) {
120 os <<
"\t\t\t\"" << i <<
"\"" <<
", not evaluated" << std::endl;
135 std::pair<const DDPartSelection*,const DDsvalues_type*> pssv(ps,sv);
136 result.emplace_back(std::make_pair(logp,pssv));
155 edm::LogError(
"Specific") <<
" >> more or less than one part-selector, currently NOT SUPPORTED! <<" << std::endl;
156 return std::make_pair(
false,e);
160 DDPartSelection::const_iterator it = ps.begin();
161 DDPartSelection::const_iterator ed = ps.end();
162 if ( (it != ed) && ( it->selectionType_ !=
ddanyposp) ) {
163 edm::LogError(
"Specific") <<
" >> part-selector must start with //Name[no] ! << " << std::endl;
164 return std::make_pair(
false,e);
167 for (; it != ps.end(); ++it) {
169 edm::LogError(
"Specific") <<
" >> part-selector must be a concatenation of direct children\n" 170 <<
" including their copy-number only, CURRENT LIMITATION! <<" << std::endl;
171 return std::make_pair(
false,e);
177 for (; it != ed; ++it) {
190 return std::make_pair(result,e);
const std::string & name(void) const
the name of the DDValue
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
const std::vector< DDPartSelection > & selection() const
std::vector< DDPartSelection > partSelections_
static const uint16_t valid_
Compact representation of the geometrical detector hierarchy.
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
DDsvalues_type specifics_
Specific(const std::vector< std::string > &selections, const DDsvalues_type &specs, bool doRegex=true)
void createPartSelections(const std::string &selString)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::pair< bool, DDExpandedView > node() const
gives the geometrical history of a fully specified PartSelector
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
std::pair< bool, std::string > DDIsValid(const std::string &ns, const std::string &name, std::vector< DDLogicalPart > &result, bool doRegex=true)
int copyno() const
Copy number associated with the current node.
bool firstChild()
set the current node to the first child ...
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< const DDPartSelection *, const DDsvalues_type * > > > &) const
void DDTokenize2(const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)
bool nextSibling()
set the current node to the next sibling ...
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
unsigned int size() const
the size of the stored value-pairs (std::string,double)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
Provides an exploded view of the detector (tree-view)
void stream(std::ostream &) const