artdaq_mfextensions  v1_05_00
ma_cond_test_primary.h
1 #ifndef ERROR_HANDLER_MA_COND_TEST_PRIMARY_H
2 #define ERROR_HANDLER_MA_COND_TEST_PRIMARY_H
3 
4 #include "ErrorHandler/MessageAnalyzer/ma_types.h"
5 #include "ErrorHandler/MessageAnalyzer/ma_test_function.h"
6 
7 #include <boost/shared_ptr.hpp>
8 #include <boost/any.hpp>
9 
10 #include <list>
11 
12 namespace novadaq {
13 namespace errorhandler {
14 
15 typedef boost::any any_t;
16 typedef std::vector<boost::any> anys_t;
17 
18 class ma_cond_test_expr;
19 
21 {
22 public:
23 
25  : cond_type ( EXPR )
26  , op ( CO_L )
27  , rhv_b ( false )
28  , rhv_d ( 0.0 )
29  , rhv_s ( )
30  { }
31 
32  bool evaluate( ma_condition const * cond ) const;
33 
34  void insert_expr ( ma_cond_test_expr const & expr );
35  void insert_func ( std::string const & name
36  , anys_t const & args );
37  void insert_compare_op( compare_op_t cop, any_t const & v );
38 
39 private:
40 
41  cond_type_t cond_type;
42 
43  boost::shared_ptr<ma_test_function> func;
44 
45  compare_op_t op;
46  bool rhv_b;
47  double rhv_d;
48  std::string rhv_s;
49 
50  // shared_ptr to a test expression
51  boost::shared_ptr<ma_cond_test_expr> expr;
52 
53 };
54 
55 typedef std::list< ma_cond_test_primary > test_primaries_t;
56 
57 
58 } // end of namespace errorhandler
59 } // end of namespace novadaq
60 
61 
62 
63 #endif
64 
65 
66 
67 
68