Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:45:40

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