// @(#)root/minuit2:$Id$ // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 /********************************************************************** * * * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * * * **********************************************************************/ #ifndef ROOT_Minuit2_ABProd #define ROOT_Minuit2_ABProd #include "Minuit2/ABObj.h" namespace ROOT { namespace Minuit2 { template class ABProd { private: ABProd() : fA(M1()), fB(M2()) {} ABProd& operator=(const ABProd&) {return *this;} template ABProd& operator=(const ABProd&) {return *this;} public: ABProd(const M1& a, const M2& b): fA(a), fB(b) {} ~ABProd() {} ABProd(const ABProd& prod) : fA(prod.fA), fB(prod.fB) {} template ABProd(const ABProd& prod) : fA(M1(prod.A() )), fB(M2(prod.B() )) {} const M1& A() const {return fA;} const M2& B() const {return fB;} private: M1 fA; M2 fB; }; // ABObj * ABObj template inline ABObj::Type, ABProd, ABObj >,T> operator*(const ABObj& a, const ABObj& b) { return ABObj::Type, ABProd, ABObj >,T>(ABProd, ABObj >(a, b)); } } // namespace Minuit2 } // namespace ROOT #endif // ROOT_Minuit2_ABProd