CMS 3D CMS Logo

DecomposeProduct.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_DecomposeProduct_h
2 #define PhysicsTools_Utilities_DecomposeProduct_h
4 
5 namespace funct {
6 
7  template <typename A, typename B>
8  struct DecomposeProduct {};
9 
10  template <typename A>
11  struct DecomposeProduct<A, A> {
12  inline static const A& get(const A& a) { return a; }
13  };
14 
15  template <typename A, typename B>
17  inline static const A& get(const ProductStruct<A, B>& _) { return _._1; }
18  };
19 
20  template <typename A, typename B>
22  inline static const B& get(const ProductStruct<A, B>& _) { return _._2; }
23  };
24 
25 } // namespace funct
26 
27 #endif
funct::DecomposeProduct
Definition: DecomposeProduct.h:8
funct::DecomposeProduct< A, A >::get
static const A & get(const A &a)
Definition: DecomposeProduct.h:12
Product.h
funct::B
TEMPL(T2) struct Divides B
Definition: Factorize.h:24
crabWrapper._
_
Definition: crabWrapper.py:19
funct::ProductStruct
Definition: Product.h:6
funct::DecomposeProduct< ProductStruct< A, B >, A >::get
static const A & get(const ProductStruct< A, B > &_)
Definition: DecomposeProduct.h:17
a
double a
Definition: hdecay.h:119
funct::DecomposeProduct< ProductStruct< A, B >, B >::get
static const B & get(const ProductStruct< A, B > &_)
Definition: DecomposeProduct.h:22
A
funct
Definition: Abs.h:5