6 #include "boost/spirit/include/classic.hpp"
13 namespace boost {
namespace spirit {
namespace classic { } } }
using namespace boost::spirit::classic;
22 std::vector<DDPartSelRegExpLevel>*
p_;
24 std::vector<DDPartSelRegExpLevel>*
path(std::vector<DDPartSelRegExpLevel>*
p=0) {
52 void operator() (
char const* ,
char const* )
const {
54 if (c_.isCopyNoValid_ && c_.isChild_) {
58 if (c_.isCopyNoValid_ && !c_.isChild_) {
62 if (!c_.isCopyNoValid_ && c_.isChild_) {
66 if (!c_.isCopyNoValid_ && !c_.isChild_) {
72 c_.isCopyNoValid_=
false;
84 if ( (last-first) > 1)
86 if ( (last-first) ==1 )
112 sl.
name_.assign(first,last);
134 template <
typename ScannerT>
144 FirstStep = Descendant
148 Part = PartNameCopyNumber
152 PartNameCopyNumber = PartName
160 NavigationalElement = Descendant
164 CopyNumber = ch_p(
'[')
165 >> int_p[copyNoFtor()]
169 PartName = NameSpaceName
173 SimpleName = +( alnum_p | ch_p(
'_') | ch_p(
'.') | ch_p(
'*') )
176 NameSpaceName = SimpleName[nameSpaceFtor()]
178 >> SimpleName[nameFtor()]
181 Descendant = ch_p(
'/')
191 CopyNumber, PartName, PartNameCopyNumber, NameSpaceName,
SimpleName,
224 : lp_(lp), copyno_(c), selectionType_(t)
233 edm::LogError(
"DDPartSelection") <<
"DDTokenize2() error in parsing of " << sel << std::endl;
239 DDPartSelection::const_iterator it(p.begin()), ed(p.end());
240 for (; it != ed; ++it) {
256 o <<
"{Syntax ERROR}";
262 std::ostream & operator<<(std::ostream & os, const std::vector<DDPartSelection> &
v)
264 std::vector<DDPartSelection>::const_iterator it(
v.begin()), ed(
v.end());
265 for (; it != (ed-1); ++it) {
266 os << *it << std::endl;
280 #include <DetectorDescription/Base/interface/Singleton.icc>
DDSelLevelFtor * selLevelFtor_
DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type)
void operator()(char const *first, char const *last) const
Evaluator * parse(const T &text)
static PFTauRenderPlugin instance
rule< ScannerT > SimpleName
DDCopyNoFtor & copyNoFtor()
std::ostream & operator<<(std::ostream &out, const ALILine &li)
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 &selectionString, std::vector< DDPartSelRegExpLevel > &result)
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()