Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-17 23:10:25

0001 #ifndef CommonTools_Utils_UnaryCutSetter_h
0002 #define CommonTools_Utils_UnaryCutSetter_h
0003 /* \class reco::parser::UnaryCutSetter
0004  *
0005  * Cut setter
0006  *
0007  * \author original version: Chris Jones, Cornell, 
0008  *         adapted by Luca Lista, INFN
0009  *
0010  * \version $Revision: 1.2 $
0011  *
0012  */
0013 #include "CommonTools/Utils/interface/SelectorStack.h"
0014 #include "CommonTools/Utils/interface/LogicalUnaryOperator.h"
0015 
0016 namespace reco {
0017   namespace parser {
0018     template <typename Op>
0019     struct UnaryCutSetter {
0020       UnaryCutSetter(SelectorStack& selStack) : selStack_(selStack) {}
0021       void operator()(const char*, const char*) const {
0022         selStack_.push_back(SelectorPtr(new LogicalUnaryOperator<Op>(selStack_)));
0023       }
0024       void operator()(const char&) const {
0025         const char* c;
0026         operator()(c, c);
0027       }
0028       SelectorStack& selStack_;
0029     };
0030   }  // namespace parser
0031 }  // namespace reco
0032 
0033 #endif