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;
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_
vector< string > parse(string line, const string &delimiter)
DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type)
void operator()(char const *first, char const *last) const
std::ostream & operator<<(std::ostream &o, const DDPartSelection &p)
static PFTauRenderPlugin instance
rule< ScannerT > SimpleName
std::vector< DDPartSelRegExpLevel > * path(std::vector< DDPartSelRegExpLevel > *p=nullptr)
rule< ScannerT > const & start() const
DDCopyNoFtor & copyNoFtor()
Log< level::Error, false > LogError
DDIsChildFtor & isChildFtor()
static value_type & instance()
void noNameSpace(char const *, char const *)
definition(SpecParParser const &)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
void operator()(char const *first, char const *last) const
ddselection_type selectionType_
void DDTokenize2(const std::string &sel, std::vector< DDPartSelRegExpLevel > &path)
Templated helper class to allow a selection on a certain object collection.
void operator()(int i) const
void operator()(char const *first, char const *last) const
void operator()(char const *, char const *) const
DDNameSpaceFtor & nameSpaceFtor()
std::vector< DDPartSelRegExpLevel > * p_
DDSelLevelFtor & selLevelFtor()