CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/HLTrigger/HLTcore/interface/TriggerExpressionConstant.h

Go to the documentation of this file.
00001 #ifndef HLTrigger_HLTfilters_TriggerExpressionConstant_h
00002 #define HLTrigger_HLTfilters_TriggerExpressionConstant_h
00003 
00004 #include "HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h"
00005 
00006 namespace triggerExpression {
00007 
00008 class Data;
00009 
00010 class Constant : public Evaluator {
00011 public:
00012   Constant(bool value) :
00013     m_value(value)
00014   { }
00015 
00016   bool operator()(const Data & data) const {
00017     return m_value;
00018   }
00019 
00020   void init(const Data & data) {
00021   }
00022 
00023   void dump(std::ostream & out) const {
00024     out << (m_value ? "TRUE" : "FALSE");
00025   }
00026 
00027 private:
00028   bool m_value;
00029 };
00030 
00031 } // namespace triggerExpression
00032 
00033 #endif // HLTrigger_HLTfilters_TriggerExpressionConstant_h