Index: trunk/SophyaLib/HiStats/hisprof.cc
===================================================================
--- trunk/SophyaLib/HiStats/hisprof.cc	(revision 1046)
+++ trunk/SophyaLib/HiStats/hisprof.cc	(revision 1053)
@@ -230,16 +230,4 @@
 }
 
-/********* Methode *********/
-/*!
-  Operateur H = H1 + H2
-  Meme commentaire que pour l'operateur +=
-*/
-HProf operator + (const HProf& a, const HProf& b)
-{
-if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
-HProf c(a);
-return (c += b);
-}
-
 ///////////////////////////////////////////////////////////
 // --------------------------------------------------------
Index: trunk/SophyaLib/HiStats/hisprof.h
===================================================================
--- trunk/SophyaLib/HiStats/hisprof.h	(revision 1046)
+++ trunk/SophyaLib/HiStats/hisprof.h	(revision 1053)
@@ -52,5 +52,4 @@
   HProf& operator = (const HProf& h);
   HProf& operator += (const HProf& a);
-  friend HProf operator + (const HProf& a, const HProf& b);
 
   // Fit
@@ -94,4 +93,14 @@
 // ObjFileIO<HProf>
 
+/*! \ingroup HiStats \fn operator+(const HProf&, const HProf&)
+  \brief Operateur H = H1 + H2
+  \warning Meme commentaire que pour l'operateur +=
+*/
+inline HProf operator + (const HProf& a, const HProf& b)
+{
+if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
+HProf c(a);
+return (c += b);
+}
 
 } // Fin du namespace
Index: trunk/SophyaLib/HiStats/histos.cc
===================================================================
--- trunk/SophyaLib/HiStats/histos.cc	(revision 1046)
+++ trunk/SophyaLib/HiStats/histos.cc	(revision 1053)
@@ -1,4 +1,4 @@
 //
-// $Id: histos.cc,v 1.5 2000-04-18 13:38:16 ansari Exp $
+// $Id: histos.cc,v 1.6 2000-06-30 13:21:52 ansari Exp $
 //
 
@@ -192,69 +192,4 @@
 /********* Methode *********/
 /*!
-  Operateur H2 = H1 * b
-*/
-Histo operator * (const Histo& a, double b)
-{
-  Histo result(a);
-  return (result *= b);
-}
-
-/*!
-  Operateur H2 = b * H1
-*/
-Histo operator * (double b, const Histo& a)
-{
-  Histo result(a);
-  return (result *= b);
-}
-
-/*!
-  Operateur H2 = H1 / b
-*/
-Histo operator / (const Histo& a, double b)
-{
-  Histo result(a);
-  return (result /= b);
-}
-
-/*!
-  Operateur H2 = H1 + b
-*/
-Histo operator + (const Histo& a, double b)
-{
-  Histo result(a);
-  return (result += b);
-}
-
-/*!
-  Operateur H2 = b + H1
-*/
-Histo operator + (double b, const Histo& a)
-{
-  Histo result(a);
-  return (result += b);
-}
-
-/*!
-  Operateur H2 = H1 - b
-*/
-Histo operator - (const Histo& a, double b)
-{
-  Histo result(a);
-  return (result -= b);
-}
-
-/*!
-  Operateur H2 = b - H1
-*/
-Histo operator - (double b, const Histo& a)
-{
-  Histo result(a);
-  result *= -1.;
-  return (result += b);
-}
-
-/********* Methode *********/
-/*!
   Operateur H += H1
 */
@@ -265,5 +200,4 @@
   data[i] += a(i);
   if(err2 && a.err2) err2[i] += a.Error2(i);
-    else err2[i] = 0.;
 }
 under += a.under;
@@ -284,5 +218,4 @@
   data[i] -= a(i);
   if(err2 && a.err2) err2[i] += a.Error2(i);
-    else err2[i] = 0.;
 }
 under -= a.under;
@@ -304,5 +237,4 @@
   if(err2 && a.err2)
       err2[i] = a(i)*a(i)*err2[i] + data[i]*data[i]*a.Error2(i);
-    else err2[i] = 0.;
   data[i] *= a(i);
   nHist += data[i];
@@ -331,5 +263,4 @@
       err2[i] = (err2[i] + data[i]/a(i)*data[i]/a(i)*a.Error2(i))
                 /(a(i)*a(i));
-    else err2[i] = 0.;
   data[i] /= a(i);
   nHist += data[i];
@@ -340,45 +271,4 @@
 
 return *this;
-}
-
-/********* Methode *********/
-/*!
-  Operateur H = H1 + H2
-*/
-Histo operator + (const Histo& a, const Histo& b)
-{
-if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
-Histo c(a);
-return (c += b);
-}
-
-/*!
-  Operateur H = H1 - H2
-*/
-Histo operator - (const Histo& a, const Histo& b)
-{
-if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
-Histo c(a);
-return (c -= b);
-}
-
-/*!
-  Operateur H = H1 * H2
-*/
-Histo operator * (const Histo& a, const Histo& b)
-{
-if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
-Histo c(a);
-return (c *= b);
-}
-
-/*!
-  Operateur H = H1 / H2
-*/
-Histo operator / (const Histo& a, const Histo& b)
-{
-if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
-Histo c(a);
-return (c /= b);
 }
 
@@ -448,5 +338,5 @@
 for(int i=0;i<bins;i++) {
   data[i] += v(i);
-  if(err2&&ierr) err2[i] += fabs(v(i));
+  if(err2 && ierr) err2[i] += fabs(v(i));
 }
 return;
Index: trunk/SophyaLib/HiStats/histos.h
===================================================================
--- trunk/SophyaLib/HiStats/histos.h	(revision 1046)
+++ trunk/SophyaLib/HiStats/histos.h	(revision 1053)
@@ -1,5 +1,5 @@
 // This may look like C code, but it is really -*- C++ -*-
 //
-// $Id: histos.h,v 1.6 2000-04-18 13:38:17 ansari Exp $
+// $Id: histos.h,v 1.7 2000-06-30 13:21:53 ansari Exp $
 //
 
@@ -50,19 +50,8 @@
   Histo& operator += (double b);
   Histo& operator -= (double b);
-  friend Histo operator * (const Histo& a, double b);
-  friend Histo operator * (double b, const Histo& a);
-  friend Histo operator / (const Histo& a, double b);
-  friend Histo operator + (const Histo& a, double b);
-  friend Histo operator + (double b, const Histo& a);
-  friend Histo operator - (const Histo& a, double b);
-  friend Histo operator - (double b, const Histo& a);
   Histo& operator += (const Histo& a);
   Histo& operator -= (const Histo& a);
   Histo& operator *= (const Histo& a);
   Histo& operator /= (const Histo& a);
-  friend Histo operator + (const Histo& a, const Histo& b);
-  friend Histo operator - (const Histo& a, const Histo& b);
-  friend Histo operator * (const Histo& a, const Histo& b);
-  friend Histo operator / (const Histo& a, const Histo& b);
 
   // get/put dans/depuis un vector
@@ -191,4 +180,96 @@
 // ObjFileIO<Histo>
 
+/*! \ingroup HiStats \fn operator*(const Histo&,double)
+  \brief Operateur H2 = H1 * b */
+inline Histo operator * (const Histo& a, double b)
+{
+  Histo result(a);
+  return (result *= b);
+}
+
+/*! \ingroup HiStats \fn operator*(double,const Histo&)
+  \brief Operateur H2 = b * H1 */
+inline Histo operator * (double b, const Histo& a)
+{
+  Histo result(a);
+  return (result *= b);
+}
+
+/*! \ingroup HiStats \fn operator/(const Histo&,double)
+  \brief Operateur H2 = H1 / b */
+inline Histo operator / (const Histo& a, double b)
+{
+  Histo result(a);
+  return (result /= b);
+}
+
+/*! \ingroup HiStats \fn operator+(const Histo&,double)
+  \brief Operateur H2 = H1 + b */
+inline Histo operator + (const Histo& a, double b)
+{
+  Histo result(a);
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator+(double,const Histo&)
+  \brief Operateur H2 = b + H1 */
+inline Histo operator + (double b, const Histo& a)
+{
+  Histo result(a);
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator-(const Histo&,double)
+  \brief Operateur H2 = H1 - b */
+inline Histo operator - (const Histo& a, double b)
+{
+  Histo result(a);
+  return (result -= b);
+}
+
+/*! \ingroup HiStats \fn operator-(double,const Histo&)
+  \brief Operateur H2 = b - H1 */
+inline Histo operator - (double b, const Histo& a)
+{
+  Histo result(a);
+  result *= -1.;
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator+(const Histo&,const Histo&)
+  \brief Operateur H = H1 + H2 */
+inline Histo operator + (const Histo& a, const Histo& b)
+{
+if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
+Histo c(a);
+return (c += b);
+}
+
+/*! \ingroup HiStats \fn operator-(const Histo&,const Histo&)
+  \brief Operateur H = H1 - H2 */
+inline Histo operator - (const Histo& a, const Histo& b)
+{
+if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
+Histo c(a);
+return (c -= b);
+}
+
+/*! \ingroup HiStats \fn operator*(const Histo&,const Histo&)
+  \brief Operateur H = H1 * H2 */
+inline Histo operator * (const Histo& a, const Histo& b)
+{
+if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
+Histo c(a);
+return (c *= b);
+}
+
+/*! \ingroup HiStats \fn operator/(const Histo&,const Histo&)
+  \brief Operateur H = H1 / H2 */
+inline Histo operator / (const Histo& a, const Histo& b)
+{
+if (b.NBins()!=a.NBins()) THROW(sizeMismatchErr);
+Histo c(a);
+return (c /= b);
+}
 
 } // Fin du namespace
Index: trunk/SophyaLib/HiStats/histos2.cc
===================================================================
--- trunk/SophyaLib/HiStats/histos2.cc	(revision 1046)
+++ trunk/SophyaLib/HiStats/histos2.cc	(revision 1053)
@@ -390,69 +390,4 @@
 ///////////////////////////////////////////////////////////////////
 /*!
-  Operateur H2 = H1 * b
-*/
-Histo2D operator * (const Histo2D& a, double b)
-{
-  Histo2D result(a);
-  return (result *= b);
-}
-
-/*!
-  Operateur H2 = b * H1
-*/
-Histo2D operator * (double b, const Histo2D& a)
-{
-  Histo2D result(a);
-  return (result *= b);
-}
-
-/*!
-  Operateur H2 = H1 / b
-*/
-Histo2D operator / (const Histo2D& a, double b)
-{
-  Histo2D result(a);
-  return (result /= b);
-}
-
-/*!
-  Operateur H2 = H1 + b
-*/
-Histo2D operator + (const Histo2D& a, double b)
-{
-  Histo2D result(a);
-  return (result += b);
-}
-
-/*!
-  Operateur H2 = b + H1
-*/
-Histo2D operator + (double b, const Histo2D& a)
-{
-  Histo2D result(a);
-  return (result += b);
-}
-
-/*!
-  Operateur H2 = H1 - b
-*/
-Histo2D operator - (const Histo2D& a, double b)
-{
-  Histo2D result(a);
-  return (result -= b);
-}
-
-/*!
-  Operateur H2 = b - H1
-*/
-Histo2D operator - (double b, const Histo2D& a)
-{
-  Histo2D result(a);
-  result *= -1.;
-  return (result += b);
-}
-
-///////////////////////////////////////////////////////////////////
-/*!
   Operateur H += H1
 */
@@ -555,46 +490,4 @@
 
 return *this;
-}
-
-///////////////////////////////////////////////////////////////////
-/*!
-  Operateur H = H1 + H2
-*/
-
-Histo2D operator + (const Histo2D& a, const Histo2D& b)
-{
-if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
-Histo2D c(a);
-return (c += b);
-}
-
-/*!
-  Operateur H = H1 - H2
-*/
-Histo2D operator - (const Histo2D& a, const Histo2D& b)
-{
-if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
-Histo2D c(a);
-return (c -= b);
-}
-
-/*!
-  Operateur H = H1 * H2
-*/
-Histo2D operator * (const Histo2D& a, const Histo2D& b)
-{
-if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
-Histo2D c(a);
-return (c *= b);
-}
-
-/*!
-  Operateur H = H1 / H2
-*/
-Histo2D operator / (const Histo2D& a, const Histo2D& b)
-{
-if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
-Histo2D c(a);
-return (c /= b);
 }
 
Index: trunk/SophyaLib/HiStats/histos2.h
===================================================================
--- trunk/SophyaLib/HiStats/histos2.h	(revision 1046)
+++ trunk/SophyaLib/HiStats/histos2.h	(revision 1053)
@@ -47,19 +47,8 @@
   Histo2D& operator += (double b);
   Histo2D& operator -= (double b);
-  friend Histo2D operator * (const Histo2D& a, double b);
-  friend Histo2D operator * (double b, const Histo2D& a);
-  friend Histo2D operator / (const Histo2D& a, double b);
-  friend Histo2D operator + (const Histo2D& a, double b);
-  friend Histo2D operator + (double b, const Histo2D& a);
-  friend Histo2D operator - (const Histo2D& a, double b);
-  friend Histo2D operator - (double b, const Histo2D& a);
   Histo2D& operator += (const Histo2D& a);
   Histo2D& operator -= (const Histo2D& a);
   Histo2D& operator *= (const Histo2D& a);
   Histo2D& operator /= (const Histo2D& a);
-  friend Histo2D operator + (const Histo2D& a, const Histo2D& b);
-  friend Histo2D operator - (const Histo2D& a, const Histo2D& b);
-  friend Histo2D operator * (const Histo2D& a, const Histo2D& b);
-  friend Histo2D operator / (const Histo2D& a, const Histo2D& b);
 
   // get/put dans/depuis une matrice / vector
@@ -261,4 +250,98 @@
 // ObjFileIO<Histo2D>
 
+/*! \ingroup HiStats \fn operator*(const Histo2D&,double)
+  \brief Operateur H2 = H1 * b */
+inline Histo2D operator * (const Histo2D& a, double b)
+{
+  Histo2D result(a);
+  return (result *= b);
+}
+
+/*! \ingroup HiStats \fn operator*(double,const Histo2D&)
+  \brief Operateur H2 = b * H1 */
+inline Histo2D operator * (double b, const Histo2D& a)
+{
+  Histo2D result(a);
+  return (result *= b);
+}
+
+/*! \ingroup HiStats \fn operator/(const Histo2D&,double)
+  \brief Operateur H2 = H1 / b */
+inline Histo2D operator / (const Histo2D& a, double b)
+{
+  Histo2D result(a);
+  return (result /= b);
+}
+
+/*! \ingroup HiStats \fn operator+(const Histo2D&,double)
+  \brief Operateur H2 = H1 + b */
+inline Histo2D operator + (const Histo2D& a, double b)
+{
+  Histo2D result(a);
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator+(double,const Histo2D&)
+  \brief Operateur H2 = b + H1 */
+inline Histo2D operator + (double b, const Histo2D& a)
+{
+  Histo2D result(a);
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator-(const Histo2D&,double)
+  \brief Operateur H2 = H1 - b */
+inline Histo2D operator - (const Histo2D& a, double b)
+{
+  Histo2D result(a);
+  return (result -= b);
+}
+
+/*! \ingroup HiStats \fn operator-(double,const Histo2D&)
+  \brief Operateur H2 = b - H1 */
+inline Histo2D operator - (double b, const Histo2D& a)
+{
+  Histo2D result(a);
+  result *= -1.;
+  return (result += b);
+}
+
+/*! \ingroup HiStats \fn operator+(const Histo2D&,const Histo2D&)
+  \brief Operateur H = H1 + H2 */
+
+inline Histo2D operator + (const Histo2D& a, const Histo2D& b)
+{
+if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
+Histo2D c(a);
+return (c += b);
+}
+
+/*! \ingroup HiStats \fn operator-(const Histo2D&,const Histo2D&)
+  \brief Operateur H = H1 - H2 */
+inline Histo2D operator - (const Histo2D& a, const Histo2D& b)
+{
+if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
+Histo2D c(a);
+return (c -= b);
+}
+
+/*! \ingroup HiStats \fn operator*(const Histo2D&,const Histo2D&)
+  \brief Operateur H = H1 * H2 */
+inline Histo2D operator * (const Histo2D& a, const Histo2D& b)
+{
+if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
+Histo2D c(a);
+return (c *= b);
+}
+
+/*! \ingroup HiStats \fn operator/(const Histo2D&,const Histo2D&)
+  \brief Operateur H = H1 / H2 */
+inline Histo2D operator / (const Histo2D& a, const Histo2D& b)
+{
+if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);
+Histo2D c(a);
+return (c /= b);
+}
+
 } // Fin du namespace
 
