1 #ifndef HLTrigger_HLTfilters_TriggerExpressionParser_h
2 #define HLTrigger_HLTfilters_TriggerExpressionParser_h
5 #include <boost/spirit/include/phoenix.hpp>
6 #include <boost/spirit/include/qi.hpp>
14 namespace triggerExpression {
16 namespace qi = boost::spirit::qi;
17 namespace ascii = boost::spirit::ascii;
19 using boost::phoenix::new_;
20 using boost::spirit::unused_type;
22 template <
typename Iterator>
23 class Parser :
public qi::grammar<Iterator, Evaluator *(), ascii::space_type> {
26 token_l1algo %= qi::raw[qi::lexeme[
"L1_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
27 token_path %= qi::raw[qi::lexeme[+(qi::char_(
"a-zA-Z0-9_*?"))]];
29 token = (qi::lit(
"TRUE")[qi::_val = new_<Constant>(
true)] | qi::lit(
"FALSE")[qi::_val = new_<Constant>(
false)] |
36 prescale = (
element >>
'/' >> qi::uint_)[qi::_val = new_<Prescaler>(qi::_1, qi::_2)];
40 unary = (
operand[qi::_val = qi::_1] | (qi::lit(
"NOT") >>
operand)[qi::_val = new_<OperatorNot>(qi::_1)]);
43 unary[qi::_val = qi::_1] >> *((qi::lit(
"AND") >>
unary)[qi::_val = new_<OperatorAnd>(qi::_val, qi::_1)] |
44 (qi::lit(
"OR") >>
unary)[qi::_val = new_<OperatorOr>(qi::_val, qi::_1)]);
48 typedef qi::rule<Iterator, std::string(), ascii::space_type>
name_rule;
49 typedef qi::rule<Iterator, Evaluator *(), ascii::space_type>
rule;
66 typedef typename T::const_iterator
Iterator;
70 Iterator
begin = text.begin();
71 Iterator
end = text.end();
74 bool result = qi::phrase_parse(begin, end, parser, ascii::space, evaluator);
76 if (not result
or begin != end) {
90 const char *
end = text + strlen(text);
93 bool result = qi::phrase_parse(begin, end, parser, ascii::space, evaluator);
95 if (not result
or begin != end) {
105 #endif // HLTrigger_HLTfilters_TriggerExpressionParser_h
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Evaluator * parse(const T &text)
qi::rule< Iterator, Evaluator *(), ascii::space_type > rule
qi::rule< Iterator, std::string(), ascii::space_type > name_rule
dd4hep::tools::Evaluator & evaluator()