43 : theLVTree(new
LVTree(rv))
75 std::vector<G4LogicalVolume*> & result,
79 const char * aRegexCStr = aRegexStr.
data();
80 if (regcomp(&aRegex,aRegexCStr,0)) {
86 FindLV(&aRegex,aNode,result,stopAtFirst);
93 std::vector<G4LogicalVolume*>& result,
96 if( !regexec(aRegex, node->
data()->GetName().data(), 0,0,0))
98 result.push_back(node->
data());
108 FindLV(aRegex, i, result, stopAtFirst);
123 result.push_back(aLV);
131 std::vector<G4String>& tokens)
133 G4String::size_type
c = aStr.size();
134 G4String::size_type idx = 0;
135 G4String::size_type idx2 = 0;
140 tokens.push_back(
"/");
145 std::vector<G4int> pos;
149 if (aStr[idx]==sep[idx])
150 tokens.push_back(
"/");
154 G4String::size_type i=0;
155 for (i=0; i<
c; i++) {
157 if(curStr[idx]==sep[idx2]) {
167 for (
G4int i=0; i<pos.size(); i++ )
172 for (i=1; i<pos.size(); i++)
176 for(
G4int j=pos[i-1]; j<=pos[i]; j++) {
178 if (curStr[idx]!=sep[idx2])
179 newString.
append(curStr[idx]);
181 if (newString.size())
182 tokens.push_back(newString);
186 for (
G4int i=0; i<tokens.size(); i++)
187 G4cout <<
"tok " << i <<
" " << tokens[i] << G4endl;
190 return tokens.size();
196 std::vector<G4String> tokens;
203 std::vector<G4String>::iterator it = tokens.begin();
210 while ( it != tokens.end() )
215 anItem = anItem->
parent();
225 const char * aRegexCStr = (*it).data();
226 if (regcomp(&aRegex,aRegexCStr,0))
248 if ( !regexec(&aRegex, u->
data()->GetName().data(),0,0,0))
268 if (anItem!=anItemBefore)
271 return anItem->
data();
285 result.push_back(temp->
data());
287 return result.size();
295 std::set<G4LogicalVolume*> lvset;
302 std::set<G4LogicalVolume*>::iterator it = lvset.begin();
303 for(;it!=lvset.end();++it)
318 result.push_back(n->
data());