CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CommonTools/Utils/interface/AndPairSelector.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_AndPairSelector_h
00002 #define CommonTools_Utils_AndPairSelector_h
00003 /* \class AndPairSelector
00004  *
00005  * \author Luca Lista, INFN
00006  *
00007  * $Id: AndPairSelector.h,v 1.1 2009/02/24 14:40:26 llista Exp $
00008  */
00009 
00010 template<typename S1, typename S2>
00011 struct AndPairSelector {
00012   AndPairSelector(const S1 & s1, const S2 & s2) : s1_(s1), s2_(s2) { }
00013   template<typename T1, typename T2>
00014   bool operator()(const T1 & t1, const T2 & t2) const {
00015     return s1_(t1) && s2_(t2);
00016   }
00017 private:
00018   S1 s1_;
00019   S2 s2_;
00020 };
00021 
00022 #endif