6 #include "boost/spirit/include/classic.hpp" 21 std::vector<DDPartSelRegExpLevel>*
p_;
23 std::vector<DDPartSelRegExpLevel>*
path(std::vector<DDPartSelRegExpLevel>*
p =
nullptr) {
29 isCopyNoValid_ =
false;
50 if (c_.isCopyNoValid_ && c_.isChild_) {
53 }
else if (c_.isCopyNoValid_ && !c_.isChild_) {
56 }
else if (!c_.isCopyNoValid_ && c_.isChild_) {
59 }
else if (!c_.isCopyNoValid_ && !c_.isChild_) {
65 c_.isCopyNoValid_ =
false;
75 if ((last - first) > 1)
77 if ((last - first) == 1)
96 sl.
name_.assign(first, last);
112 template <
typename ScannerT>
119 FirstStep = Descendant >> Part;
121 Part = PartNameCopyNumber | PartName;
123 PartNameCopyNumber = PartName >> CopyNumber;
127 NavigationalElement = Descendant | Child;
129 CopyNumber = ch_p(
'[') >> int_p[copyNoFtor()] >> ch_p(
']');
131 PartName = NameSpaceName | SimpleName[nameFtor()][&
noNameSpace];
133 SimpleName = +(alnum_p | ch_p(
'_') | ch_p(
'.') | ch_p(
'*'));
135 NameSpaceName = SimpleName[nameSpaceFtor()] >>
':' >> SimpleName[nameFtor()];
137 Descendant = ch_p(
'/') >> ch_p(
'/');
143 PartNameCopyNumber, NameSpaceName,
SimpleName, Descendant, Child;
172 : lp_(lp), copyno_(c), selectionType_(t) {}
179 edm::LogError(
"DDPartSelection") <<
"DDTokenize2() error in parsing of " << sel << std::endl;
184 DDPartSelection::const_iterator it(p.begin()), ed(p.end());
185 for (; it != ed; ++it) {
201 o <<
"{Syntax ERROR}";
207 std::ostream& operator<<(std::ostream& os, const std::vector<DDPartSelection>&
v) {
208 std::vector<DDPartSelection>::const_iterator it(
v.begin()), ed(
v.end());
209 for (; it != (ed - 1); ++it) {
210 os << *it << std::endl;
224 #include <DetectorDescription/Core/interface/Singleton.icc> DDSelLevelFtor * selLevelFtor_
DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type)
std::ostream & operator<<(std::ostream &o, const DDPartSelection &p)
void operator()(char const *first, char const *last) const
static PFTauRenderPlugin instance
rule< ScannerT > SimpleName
DDCopyNoFtor & copyNoFtor()
void operator()(int i) const
DDIsChildFtor & isChildFtor()
static value_type & instance()
void noNameSpace(char const *, char const *)
std::vector< DDPartSelRegExpLevel > * path(std::vector< DDPartSelRegExpLevel > *p=0)
definition(SpecParParser const &)
void operator()(char const *first, char const *last) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
ddselection_type selectionType_
rule< ScannerT > const & start() const
void DDTokenize2(const std::string &sel, std::vector< DDPartSelRegExpLevel > &path)
Templated helper class to allow a selection on a certain object collection.
void operator()(char const *first, char const *last) const
DDNameSpaceFtor & nameSpaceFtor()
void operator()(char const *, char const *) const
std::vector< DDPartSelRegExpLevel > * p_
DDSelLevelFtor & selLevelFtor()