Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-05 22:47:53

0001 #ifndef CommonTools_Utils_OrCombiner_h
0002 #define CommonTools_Utils_OrCombiner_h
0003 /* \class reco::parser::OrCombiner
0004  *
0005  * logical OR combiner
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/SelectorBase.h"
0014 #include "CommonTools/Utils/interface/SelectorPtr.h"
0015 
0016 namespace reco {
0017   namespace parser {
0018     struct OrCombiner : public SelectorBase {
0019       OrCombiner(SelectorPtr lhs, SelectorPtr rhs) : lhs_(lhs), rhs_(rhs) {}
0020       bool operator()(const edm::ObjectWithDict& o) const override { return (*lhs_)(o) || (*rhs_)(o); }
0021 
0022     private:
0023       SelectorPtr lhs_, rhs_;
0024     };
0025   }  // namespace parser
0026 }  // namespace reco
0027 
0028 #endif