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>
15 namespace triggerExpression {
17 namespace qi = boost::spirit::qi;
18 namespace ascii = boost::spirit::ascii;
20 using boost::phoenix::new_;
21 using boost::spirit::unused_type;
23 template <
typename Iterator>
24 class Parser :
public qi::grammar<Iterator, Evaluator*(), ascii::space_type>
30 token_hlt %= qi::raw[qi::lexeme[
"HLT_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
31 token_alca %= qi::raw[qi::lexeme[
"AlCa_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
32 token_dqm %= qi::raw[qi::lexeme[
"DQM_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
33 token_dst %= qi::raw[qi::lexeme[
"DST_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
34 token_step %= qi::raw[qi::lexeme[
"generation_step"]];
35 token_l1 %= qi::raw[qi::lexeme[
"L1_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
36 token_l1tech %= qi::raw[qi::lexeme[
"L1Tech_" >> +(qi::char_(
"a-zA-Z0-9_*?"))]];
39 |
token_alca [qi::_val = new_<HLTReader>(qi::_1)]
40 |
token_dqm [qi::_val = new_<HLTReader>(qi::_1)]
41 |
token_dst [qi::_val = new_<HLTReader>(qi::_1)]
42 |
token_step [qi::_val = new_<HLTReader>(qi::_1)]
43 |
token_l1 [qi::_val = new_<L1Reader>(qi::_1)]
45 | qi::lit(
"TRUE") [qi::_val = new_<Constant>(
true)]
46 | qi::lit(
"FALSE") [qi::_val = new_<Constant>(
false)]
53 prescale = (
element >>
'/' >> qi::uint_) [qi::_val = new_<Prescaler> (qi::_1, qi::_2)];
58 | (qi::lit(
"NOT") >>
operand) [qi::_val = new_<OperatorNot> (qi::_1)]
63 (qi::lit(
"AND") >>
unary) [qi::_val = new_<OperatorAnd> (qi::_val, qi::_1)]
64 | (qi::lit(
"OR") >>
unary) [qi::_val = new_<OperatorOr> (qi::_val, qi::_1)]
69 typedef qi::rule<Iterator, unused_type(), ascii::space_type>
void_rule;
70 typedef qi::rule<Iterator, std::string(), ascii::space_type>
name_rule;
71 typedef qi::rule<Iterator, Evaluator*(), ascii::space_type>
rule;
94 typedef typename T::const_iterator
Iterator;
98 Iterator
begin = text.begin();
99 Iterator
end = text.end();
102 bool result = qi::phrase_parse( begin, end, parser, ascii::space, evaluator );
104 if (not result
or begin != end) {
118 const char *
end = text + strlen(text);
121 bool result = qi::phrase_parse( begin, end, parser, ascii::space, evaluator );
123 if (not result
or begin != end) {
133 #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
qi::rule< Iterator, unused_type(), ascii::space_type > void_rule
Evaluator * parse(const T &text)
qi::rule< Iterator, std::string(), ascii::space_type > name_rule
qi::rule< Iterator, Evaluator *(), ascii::space_type > rule