CMS 3D CMS Logo

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 #include <string>
6 #include <vector>
7 
8 namespace triggerExpression {
9 
10  class Data;
11 
12  class Evaluator {
13  public:
14  Evaluator() = default;
15 
16  // check if the data satisfies the logical expression
17  virtual bool operator()(const Data& data) const = 0;
18 
19  // (re)initialise the logical expression
20  virtual void init(const Data& data) {}
21 
22  // list CMSSW path patterns associated to the logical expression
23  virtual std::vector<std::string> patterns() const { return {}; }
24 
25  // dump the logical expression to the output stream
26  virtual void dump(std::ostream& out) const = 0;
27 
28  // virtual destructor
29  virtual ~Evaluator() = default;
30  };
31 
32  inline std::ostream& operator<<(std::ostream& out, const Evaluator& eval) {
33  eval.dump(out);
34  return out;
35  }
36 
37 } // namespace triggerExpression
38 
39 #endif // HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
virtual void dump(std::ostream &out) const =0
virtual std::vector< std::string > patterns() const
std::ostream & operator<<(std::ostream &out, const Evaluator &eval)
virtual bool operator()(const Data &data) const =0
virtual ~Evaluator()=default
virtual void init(const Data &data)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79