CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CommonTools/Utils/src/UnaryCutSetter.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_UnaryCutSetter_h
00002 #define CommonTools_Utils_UnaryCutSetter_h
00003 /* \class reco::parser::UnaryCutSetter
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/LogicalUnaryOperator.h"
00015 
00016 namespace reco {
00017   namespace parser {    
00018     template<typename Op>
00019     struct UnaryCutSetter {
00020       UnaryCutSetter(SelectorStack & selStack) :
00021         selStack_(selStack) { }
00022       void operator()(const char*, const char*) const {
00023         selStack_.push_back(SelectorPtr(new LogicalUnaryOperator<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