CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerExpressionEvaluator.h
Go to the documentation of this file.
1 #ifndef HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
2 #define HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
3 
4 #include <iostream>
5 
6 namespace triggerExpression {
7 
8 class Data;
9 
10 class Evaluator {
11 public:
12  Evaluator() { }
13 
14  // pure virtual, need a concrete implementation
15  virtual bool operator()(const Data & data) const = 0;
16 
17  // virtual function, do nothing unless overridden
18  virtual void init(const Data & data) { }
19 
20  // pure virtual, need a concrete implementation
21  virtual void dump(std::ostream & out) const = 0;
22 
23  // virtual destructor
24  virtual ~Evaluator() { }
25 };
26 
27 inline
28 std::ostream & operator<<(std::ostream & out, const Evaluator & eval) {
29  eval.dump(out);
30  return out;
31 }
32 
33 } // namespace triggerExpression
34 
35 #endif // HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
virtual void dump(std::ostream &out) const =0
std::ostream & operator<<(std::ostream &out, const Evaluator &eval)
virtual bool operator()(const Data &data) const =0
virtual void init(const Data &data)
tuple out
Definition: dbtoconf.py:99