CMS 3D CMS Logo

CutBinaryOperator.h

Go to the documentation of this file.
00001 #ifndef Utilities_CutBinaryOperator_h
00002 #define Utilities_CutBinaryOperator_h
00003 /* \class reco::parser::CutBinaryOperator
00004  *
00005  * Binary Operator expression
00006  *
00007  * \author original version: Chris Jones, Cornell, 
00008  *         adapted to Reflex by Luca Lista, INFN
00009  *
00010  * \version $Revision: 1.1 $
00011  *
00012  */
00013 #include "PhysicsTools/Utilities/src/CutBase.h"
00014 #include "PhysicsTools/Utilities/src/CutStack.h"
00015 
00016 namespace reco {
00017   namespace parser {
00018     template<typename Op>
00019     struct CutBinaryOperator : public CutBase {
00020       virtual double value(const ROOT::Reflex::Object& o) const { 
00021         return op_((*lhs_).value(o), (*rhs_).value(o));
00022       }
00023       CutBinaryOperator(CutStack & cutStack) { 
00024         rhs_ = cutStack.back(); cutStack.pop_back();
00025         lhs_ = cutStack.back(); cutStack.pop_back();
00026       }
00027     private:
00028       Op op_;
00029       CutPtr lhs_, rhs_;
00030     };
00031   }
00032 }
00033 
00034 #endif

Generated on Tue Jun 9 17:42:51 2009 for CMSSW by  doxygen 1.5.4