CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
triggerExpression::Parser< Iterator > Class Template Reference

#include <TriggerExpressionParser.h>

Inheritance diagram for triggerExpression::Parser< Iterator >:

Public Member Functions

 Parser ()
 

Private Types

typedef qi::rule< Iterator,
std::string(),
ascii::space_type > 
name_rule
 
typedef qi::rule< Iterator,
Evaluator
*(), ascii::space_type > 
rule
 
typedef qi::rule< Iterator,
unused_type(),
ascii::space_type > 
void_rule
 

Private Attributes

rule element
 
rule expression
 
rule operand
 
rule parenthesis
 
rule prescale
 
rule token
 
name_rule token_alca
 
name_rule token_dqm
 
name_rule token_dst
 
name_rule token_hlt
 
name_rule token_l1
 
name_rule token_l1tech
 
name_rule token_step
 
rule unary
 

Detailed Description

template<typename Iterator>
class triggerExpression::Parser< Iterator >

Definition at line 24 of file TriggerExpressionParser.h.

Member Typedef Documentation

template<typename Iterator>
typedef qi::rule<Iterator, std::string(), ascii::space_type> triggerExpression::Parser< Iterator >::name_rule
private

Definition at line 70 of file TriggerExpressionParser.h.

template<typename Iterator>
typedef qi::rule<Iterator, Evaluator*(), ascii::space_type> triggerExpression::Parser< Iterator >::rule
private

Definition at line 71 of file TriggerExpressionParser.h.

template<typename Iterator>
typedef qi::rule<Iterator, unused_type(), ascii::space_type> triggerExpression::Parser< Iterator >::void_rule
private

Definition at line 69 of file TriggerExpressionParser.h.

Constructor & Destructor Documentation

template<typename Iterator>
triggerExpression::Parser< Iterator >::Parser ( )
inline

Definition at line 27 of file TriggerExpressionParser.h.

References triggerExpression::Parser< Iterator >::element, triggerExpression::Parser< Iterator >::expression, triggerExpression::Parser< Iterator >::operand, triggerExpression::Parser< Iterator >::parenthesis, triggerExpression::Parser< Iterator >::prescale, triggerExpression::Parser< Iterator >::token, triggerExpression::Parser< Iterator >::token_alca, triggerExpression::Parser< Iterator >::token_dqm, triggerExpression::Parser< Iterator >::token_dst, triggerExpression::Parser< Iterator >::token_hlt, triggerExpression::Parser< Iterator >::token_l1, triggerExpression::Parser< Iterator >::token_l1tech, triggerExpression::Parser< Iterator >::token_step, and triggerExpression::Parser< Iterator >::unary.

27  :
28  Parser::base_type(expression)
29  {
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_*?"))]];
37 
38  token = ( token_hlt [qi::_val = new_<HLTReader>(qi::_1)]
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)]
44  | token_l1tech [qi::_val = new_<L1TechReader>(qi::_1)]
45  | qi::lit("TRUE") [qi::_val = new_<Constant>(true)]
46  | qi::lit("FALSE") [qi::_val = new_<Constant>(false)]
47  );
48 
49  parenthesis %= ('(' >> expression >> ')');
50 
51  element %= (token | parenthesis);
52 
53  prescale = (element >> '/' >> qi::uint_) [qi::_val = new_<Prescaler> (qi::_1, qi::_2)];
54 
55  operand %= (prescale | element);
56 
57  unary = ( operand [qi::_val = qi::_1]
58  | (qi::lit("NOT") >> operand) [qi::_val = new_<OperatorNot> (qi::_1)]
59  );
60 
61  expression = unary [qi::_val = qi::_1]
62  >> *(
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)]
65  );
66  }

Member Data Documentation

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::element
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::expression
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::operand
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::parenthesis
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::prescale
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::token
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_alca
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_dqm
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_dst
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_hlt
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_l1
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_l1tech
private
template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_step
private
template<typename Iterator>
rule triggerExpression::Parser< Iterator >::unary
private