CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/CommonTools/Utils/src/BinaryCutSetter.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_BinaryCutSetter_h
00002 #define CommonTools_Utils_BinaryCutSetter_h
00003 /* \class reco::parser::BinaryCutSetter
00004  *
00005  * Cut setter
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 "CommonTools/Utils/src/SelectorStack.h"
00014 #include "CommonTools/Utils/src/LogicalBinaryOperator.h"
00015 
00016 namespace reco {
00017   namespace parser {    
00018     template<typename Op>
00019     struct BinaryCutSetter {
00020       BinaryCutSetter(SelectorStack & selStack) :
00021         selStack_(selStack) { }
00022       void operator()(const char*, const char*) const {
00023         selStack_.push_back(SelectorPtr(new LogicalBinaryOperator<Op>(selStack_)));
00024       }     
00025       void operator()(const char&) const {
00026         const char * c;
00027         operator()(c, c);
00028       }  
00029       SelectorStack & selStack_;
00030     };
00031   }
00032  }
00033 
00034 #endif