20 std::vector<std::string>::const_iterator it = selections.begin();
21 for(; it != selections.end(); ++it) {
28 : specifics_(specs), partSelections_(selections),
valid_(
false), doRegex_(
false)
34 std::vector<DDPartSelRegExpLevel> regv;
35 std::vector<DDPartSelection>
temp;
38 if (!regv.size())
throw DDException(
"Could not evaluate the selection-std::string ->" + selString +
"<-");
39 std::vector<DDPartSelRegExpLevel>::const_iterator it = regv.begin();
40 std::pair<bool,std::string> res;
41 for (; it != regv.end(); ++it) {
42 std::vector<DDLogicalPart> lpv;
45 std::string
msg(
"Could not process q-name of a DDLogicalPart, reason:\n"+res.second);
46 msg+=
"\nSpecPar selection is:\n" + selString +
"\n";
55 std::vector<DDPartSelection>::const_iterator iit = temp.begin();
57 for (; iit != temp.end(); ++iit) {
67 std::vector<DDPartSelection> & selv)
77 ps_sizetype ps_sz = selv.size();
78 lpv_sizetype lpv_sz = lpv.size();
80 lpv_sizetype lpv_i = 0;
81 std::vector<DDPartSelection>
result;
82 for (; lpv_i < lpv_sz; ++lpv_i) {
83 std::vector<DDPartSelection>::const_iterator ps_it = selv.begin();
84 for (; ps_it != selv.end(); ++ps_it) {
85 result.push_back(*ps_it);
91 for(lpv_i=0; lpv_i < lpv_sz; ++lpv_i) {
92 for(ps_i = ps_sz*lpv_i; ps_i < ps_sz*(lpv_i+1); ++ps_i) {
108 os <<
" Size: " <<
specifics_.size() << std::endl;
109 os <<
"\tSelections:" << std::endl;
111 for (;pit!=pend;++pit) {
112 os << *pit << std::endl;
116 for (;vit!=ved;++vit) {
118 os <<
"\tParameter name= \"" << v.
name() <<
"\" " << std::endl;
119 os <<
"\t\t Value pairs: " << std::endl;
124 os <<
"\t\t\t\"" << v[
i].first <<
"\"" <<
", " << v[
i].second << std::endl;
127 const std::vector<std::string>& vs = v.
strings();
129 os <<
"\t\t\t\"" << vs[
i] <<
"\"" <<
", not evaluated" << std::endl;
148 std::pair<DDPartSelection*,DDsvalues_type*> pssv(ps,sv);
149 result.push_back(std::make_pair(logp,pssv));
168 edm::LogError(
"Specific") <<
" >> more or less than one part-selector, currently NOT SUPPORTED! <<" << std::endl;
169 return std::make_pair(
false,e);
173 DDPartSelection::const_iterator it = ps.begin();
174 DDPartSelection::const_iterator ed = ps.end();
175 if ( (it != ed) && ( it->selectionType_ !=
ddanyposp) ) {
176 edm::LogError(
"Specific") <<
" >> part-selector must start with //Name[no] ! << " << std::endl;
177 return std::make_pair(
false,e);
180 for (; it != ps.end(); ++it) {
182 edm::LogError(
"Specific") <<
" >> part-selector must be a concatenation of direct children\n"
183 <<
" including their copy-number only, CURRENT LIMITATION! <<" << std::endl;
184 return std::make_pair(
false,e);
190 for (; it != ed; ++it) {
203 return std::make_pair(result,e);
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
const std::vector< DDPartSelection > & selection() const
An exception for DDD errors.
static const uint16_t valid_
type of data representation of DDCompactView
DDsvalues_type specifics_
bool isEvaluated() const
true, if values are numerical evaluated; else false.
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
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
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< DDPartSelection *, DDsvalues_type * > > > &) const
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
partsel_type partSelections_
int copyno() const
Copy number associated with the current node.
bool firstChild()
set the current node to the first child ...
void DDTokenize2(const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)
bool nextSibling()
set the current node to the next sibling ...
std::pair< bool, std::string > DDIsValid(const std::string &ns, const std::string &name, std::vector< DDLogicalPart > &result, bool doRegex=true)
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.
const std::string & name() const
the name of the DDValue
Provides an exploded view of the detector (tree-view)
void stream(std::ostream &) const