5 #include <boost/config/warning_disable.hpp>
6 #include <boost/spirit/include/qi.hpp>
7 #include <boost/spirit/include/qi_rule.hpp>
8 #include <boost/spirit/include/qi_grammar.hpp>
9 #include <boost/spirit/include/phoenix.hpp>
11 #define DETIDFCT(NAME) NAME, [](const TrackerTopology& trackerTopology, const DetId& detId) -> int
13 #define TOPOFCT(NAME) \
14 #NAME, [](const TrackerTopology& trackerTopology, const DetId& detId) -> int { return trackerTopology.NAME(detId); }
18 {
DETIDFCT(
"subdetId"){
return (uint32_t)detId.subdetId();
128 template <
typename ITERATOR>
131 boost::spirit::ascii::space_type,
132 boost::spirit::qi::locals<ExpressionAST> > {
138 rule<ITERATOR,
ExpressionAST(), boost::spirit::ascii::space_type, boost::spirit::qi::locals<ExpressionAST> >
142 namespace qi = boost::spirit::qi;
143 namespace ascii = boost::spirit::ascii;
144 namespace phoenix = boost::phoenix;
148 identifierRule = (qi::true_[qi::_val = 1] | qi::false_[qi::_val = 0]) | (qi::int_[qi::_val = qi::_1]) |
153 (qi::lit(
"||") >>
expressionRule[qi::_a = qi::_a || qi::_1])))[qi::_val = qi::_a];
167 std::string::const_iterator begin =
selectionStr.cbegin();
173 bool success = boost::spirit::qi::phrase_parse(begin,
end, grammar, boost::spirit::ascii::space, exprAST);
175 throw cms::Exception(
"FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector",
180 throw cms::Exception(
"FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector",