00001 #ifndef CommonTools_Utils_OrCombiner_h 00002 #define CommonTools_Utils_OrCombiner_h 00003 /* \class reco::parser::OrCombiner 00004 * 00005 * logical OR combiner 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/SelectorBase.h" 00014 #include "CommonTools/Utils/src/SelectorPtr.h" 00015 00016 namespace reco { 00017 namespace parser { 00018 struct OrCombiner : public SelectorBase { 00019 OrCombiner( SelectorPtr lhs, SelectorPtr rhs ) : 00020 lhs_( lhs ), rhs_( rhs ) {} 00021 virtual bool operator()( const Reflex::Object& o ) const { 00022 return (*lhs_)( o ) || (*rhs_)( o ); 00023 } 00024 private: 00025 SelectorPtr lhs_, rhs_; 00026 }; 00027 } 00028 } 00029 00030 #endif