CMS 3D CMS Logo

OrCombiner.h

Go to the documentation of this file.
00001 #ifndef Utilities_OrCombiner_h
00002 #define Utilities_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 "PhysicsTools/Utilities/src/SelectorBase.h"
00014 #include "PhysicsTools/Utilities/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 ROOT::Reflex::Object& o ) const {
00022         return (*lhs_)( o ) || (*rhs_)( o );
00023       }
00024     private:
00025       SelectorPtr lhs_, rhs_;
00026     };
00027   }
00028 }
00029 
00030 #endif

Generated on Tue Jun 9 17:42:53 2009 for CMSSW by  doxygen 1.5.4