6 #include "boost/spirit/include/classic.hpp" 17 std::vector<DDPartSelRegExpLevel>*
p_;
19 std::vector<DDPartSelRegExpLevel>*
path(std::vector<DDPartSelRegExpLevel>*
p=0) {
47 void operator() (
char const* ,
char const* )
const {
49 if (c_.isCopyNoValid_ && c_.isChild_) {
53 if (c_.isCopyNoValid_ && !c_.isChild_) {
57 if (!c_.isCopyNoValid_ && c_.isChild_) {
61 if (!c_.isCopyNoValid_ && !c_.isChild_) {
67 c_.isCopyNoValid_=
false;
79 if ( (last-first) > 1)
81 if ( (last-first) ==1 )
107 sl.
name_.assign(first,last);
129 template <
typename ScannerT>
139 FirstStep = Descendant
143 Part = PartNameCopyNumber
147 PartNameCopyNumber = PartName
155 NavigationalElement = Descendant
159 CopyNumber = ch_p(
'[')
160 >> int_p[copyNoFtor()]
164 PartName = NameSpaceName
168 SimpleName = +( alnum_p | ch_p(
'_') | ch_p(
'.') | ch_p(
'*') )
171 NameSpaceName = SimpleName[nameSpaceFtor()]
173 >> SimpleName[nameFtor()]
176 Descendant = ch_p(
'/')
186 CopyNumber, PartName, PartNameCopyNumber, NameSpaceName,
SimpleName,
189 rule<ScannerT>
const&
start()
const {
return Selection; }
219 : lp_(lp), copyno_(c), selectionType_(t)
228 edm::LogError(
"DDPartSelection") <<
"DDTokenize2() error in parsing of " << sel << std::endl;
234 DDPartSelection::const_iterator it(p.begin()), ed(p.end());
235 for (; it != ed; ++it) {
251 o <<
"{Syntax ERROR}";
257 std::ostream & operator<<(std::ostream & os, const std::vector<DDPartSelection> &
v)
259 std::vector<DDPartSelection>::const_iterator it(
v.begin()), ed(
v.end());
260 for (; it != (ed-1); ++it) {
261 os << *it << std::endl;
275 #include <DetectorDescription/Base/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()
std::vector< DDPartSelRegExpLevel > * p_
DDSelLevelFtor & selLevelFtor()