CMS 3D CMS Logo

DecomposeProduct.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_Utilities_DecomposeProduct_h
00002 #define PhysicsTools_Utilities_DecomposeProduct_h
00003 #include "PhysicsTools/Utilities/interface/Product.h"
00004 
00005 namespace funct {
00006 
00007   template<typename A, typename B>
00008   struct DecomposeProduct { };
00009 
00010   template<typename A>
00011   struct DecomposeProduct<A, A> { 
00012     inline static const A& get(const A & a) { return a; }
00013   };
00014 
00015   template<typename A, typename B>
00016   struct DecomposeProduct<ProductStruct<A, B>, A> { 
00017     inline static const A& get(const ProductStruct<A, B> & _ ) { return _._1; }
00018   };
00019 
00020   template<typename A, typename B>
00021   struct DecomposeProduct<ProductStruct<A, B>, B> { 
00022     inline static const B& get(const ProductStruct<A, B> & _ ) { return _._2; }
00023   };
00024 
00025 }
00026 
00027 #endif

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