Logo ROOT   6.10/09
Reference Guide
ABProd.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef ROOT_Minuit2_ABProd
11 #define ROOT_Minuit2_ABProd
12 
13 #include "Minuit2/ABObj.h"
14 
15 namespace ROOT {
16 
17  namespace Minuit2 {
18 
19 
20 template<class M1, class M2>
21 class ABProd {
22 
23 private:
24 
25  ABProd() : fA(M1()), fB(M2()) {}
26 
27  ABProd& operator=(const ABProd&) {return *this;}
28 
29  template<class MI1, class MI2>
30  ABProd& operator=(const ABProd<MI1,MI2>&) {return *this;}
31 
32 public:
33 
34  ABProd(const M1& a, const M2& b): fA(a), fB(b) {}
35 
36  ~ABProd() {}
37 
38  ABProd(const ABProd& prod) : fA(prod.fA), fB(prod.fB) {}
39 
40  template<class MI1, class MI2>
41  ABProd(const ABProd<MI1,MI2>& prod) : fA(M1(prod.A() )), fB(M2(prod.B() )) {}
42 
43  const M1& A() const {return fA;}
44  const M2& B() const {return fB;}
45 
46 private:
47 
48  M1 fA;
49  M2 fB;
50 };
51 
52 // ABObj * ABObj
53 template<class atype, class A, class btype, class B, class T>
55 
56  return ABObj<typename AlgebraicProdType<atype,btype>::Type, ABProd<ABObj<atype,A,T>, ABObj<btype,B,T> >,T>(ABProd<ABObj<atype,A,T>, ABObj<btype,B,T> >(a, b));
57 }
58 
59  } // namespace Minuit2
60 
61 } // namespace ROOT
62 
63 #endif // ROOT_Minuit2_ABProd
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
double T(double x)
Definition: ChebyshevPol.h:34
ABProd(const M1 &a, const M2 &b)
Definition: ABProd.h:34
ABObj< mt, M, T > operator*(T f, const M &obj)
Definition: ABObj.h:140
TArc * a
Definition: textangle.C:12
const M2 & B() const
Definition: ABProd.h:44
const M1 & A() const
Definition: ABProd.h:43
ABProd(const ABProd &prod)
Definition: ABProd.h:38
ABProd(const ABProd< MI1, MI2 > &prod)
Definition: ABProd.h:41
ABProd & operator=(const ABProd< MI1, MI2 > &)
Definition: ABProd.h:30
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
ABProd & operator=(const ABProd &)
Definition: ABProd.h:27