CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h

Go to the documentation of this file.
00001 #ifndef HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
00002 #define HLTrigger_HLTfilters_TriggerExpressionEvaluator_h
00003 
00004 #include <iostream>
00005 
00006 namespace triggerExpression {
00007 
00008 class Data;
00009 
00010 class Evaluator {
00011 public:
00012   Evaluator() { }
00013 
00014   // pure virtual, need a concrete implementation
00015   virtual bool operator()(const Data & data) const = 0;
00016 
00017   // virtual function, do nothing unless overridden
00018   virtual void init(const Data & data) { }
00019 
00020   // pure virtual, need a concrete implementation
00021   virtual void dump(std::ostream & out) const = 0;
00022 
00023   // virtual destructor
00024   virtual ~Evaluator() { }
00025 };
00026 
00027 inline 
00028 std::ostream & operator<<(std::ostream & out, const Evaluator & eval) {
00029   eval.dump(out);
00030   return out;
00031 }
00032 
00033 } // namespace triggerExpression
00034 
00035 #endif // HLTrigger_HLTfilters_TriggerExpressionEvaluator_h