Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:36:15

0001 #ifndef CommonTools_Utils_AndPairSelector_h
0002 #define CommonTools_Utils_AndPairSelector_h
0003 /* \class AndPairSelector
0004  *
0005  * \author Luca Lista, INFN
0006  *
0007  * $Id: AndPairSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $
0008  */
0009 
0010 template <typename S1, typename S2>
0011 struct AndPairSelector {
0012   AndPairSelector(const S1& s1, const S2& s2) : s1_(s1), s2_(s2) {}
0013   template <typename T1, typename T2>
0014   bool operator()(const T1& t1, const T2& t2) const {
0015     return s1_(t1) && s2_(t2);
0016   }
0017 
0018 private:
0019   S1 s1_;
0020   S2 s2_;
0021 };
0022 
0023 #endif