Index: trunk/SophyaLib/HiStats/histos.h
===================================================================
--- trunk/SophyaLib/HiStats/histos.h	(revision 1053)
+++ trunk/SophyaLib/HiStats/histos.h	(revision 1056)
@@ -1,5 +1,5 @@
 // This may look like C code, but it is really -*- C++ -*-
 //
-// $Id: histos.h,v 1.7 2000-06-30 13:21:53 ansari Exp $
+// $Id: histos.h,v 1.8 2000-07-07 08:41:11 ansari Exp $
 //
 
@@ -28,18 +28,18 @@
   Histo(float xMin, float xMax, int nBin=100);
   Histo(const Histo& H);
-  virtual        ~Histo();
+  virtual ~Histo();
 
   // OPTIONS
-  void   Errors();
+  void Errors();
 
   // UPDATING or SETTING
-  void   Zero();
-  void   Add(float x, float w = 1.);
-  void   AddBin(int numBin, float w = 1.);
-  void   SetBin(float x, float w = 1.);
-  void   SetBin(int numBin, float w = 1.);
-  void   SetErr2(float x, double e2);
-  void   SetErr2(int numBin, double e2);
-  void   SetErr(float x, float e);
+  void Zero();
+  void Add(float x, float w = 1.);
+  void AddBin(int numBin, float w = 1.);
+  void SetBin(float x, float w = 1.);
+  void SetBin(int numBin, float w = 1.);
+  void SetErr2(float x, double e2);
+  void SetErr2(int numBin, double e2);
+  void SetErr(float x, float e);
   void   SetErr(int numBin, float e);
 
@@ -68,76 +68,77 @@
   // INLINES
   //! Retourne l'abscisse minimum
-  inline float          XMin() const             {return min;}
+  inline float XMin() const {return min;}
   //! Retourne l'abscisse maximum
-  inline float          XMax() const             {return max;}
+  inline float XMax() const {return max;}
   //! Retourne le nombre de bins
-  inline int_4          NBins() const            {return bins;}
+  inline int_4 NBins() const {return bins;}
   //! Retourne la largeur du bin
-  inline float          BinWidth() const         {return binWidth;}
+  inline float BinWidth() const {return binWidth;}
   //! Retourne le pointeur sur le tableaux des contenus
-  inline float*         Bins() const             {return data;}
+  inline float* Bins() const {return data;}
   //! Retourne le contenu du bin i
-  inline float          operator()(int i) const  {return data[i];}
+  inline float operator()(int i) const  {return data[i];}
   //! Remplit le contenu du bin i
-  inline float&         operator()(int i)        {return data[i];}
+  inline float& operator()(int i) {return data[i];}
   //! retourne "true" si il y a des erreurs stoquees
-  inline bool           HasErrors() { if(err2) return true; else return false;}
+  inline bool HasErrors()
+         {if(err2) return true; else return false;}
   //! Retourne l'erreur du bin i
-  inline float          Error(int i) const
-                          {if(err2) {if(err2[i]>0.) return sqrt(err2[i]); else return 0.;}
-                           else return 0.;}
+  inline float Error(int i) const
+         {if(err2) {if(err2[i]>0.) return sqrt(err2[i]); else return 0.;}
+                    else return 0.;}
   //! Retourne l'erreur au carre du bin i
-  inline double         Error2(int i) const
-                          {if(err2) return err2[i]; else return 0.;}
+  inline double Error2(int i) const
+         {if(err2) return err2[i]; else return 0.;}
   //! Remplit l'erreur au carre du bin i
-  inline double&        Error2(int i) {return err2[i];}
+  inline double& Error2(int i) {return err2[i];}
   //! Retourne la somme ponderee
-  inline float          NData() const            {return (float) nHist;}
+  inline float NData() const            {return (float) nHist;}
   //! Retourne le nombre d'entrees
-  inline float          NEntries() const         {return nEntries;}
+  inline float NEntries() const         {return nEntries;}
   //! Retourne le nombre d'overflow
-  inline float          NOver() const            {return over;}
+  inline float NOver() const            {return over;}
   //! Retourne le nombre d'underflow
-  inline float          NUnder() const           {return under;}
+  inline float NUnder() const           {return under;}
 
   //! Retourne l'abscisse du bord inferieur du bin i
-  inline float          BinLowEdge(int i)  const {return min + i*binWidth;}
+  inline float BinLowEdge(int i)  const {return min + i*binWidth;}
   //! Retourne l'abscisse du centre du bin i
-  inline float          BinCenter(int i)   const {return min + (i+0.5)*binWidth;}
+  inline float BinCenter(int i)   const {return min + (i+0.5)*binWidth;}
   //! Retourne l'abscisse du bord superieur du bin i
-  inline float          BinHighEdge(int i) const {return min + (i+1)*binWidth;} 
+  inline float BinHighEdge(int i) const {return min + (i+1)*binWidth;} 
   //! Retourne le numero du bin contenant l'abscisse x
-  inline int_4          FindBin(float x) const   
-                            {return (int_4) floorf((x - min) / binWidth);}
+  inline int_4 FindBin(float x) const   
+         {return (int_4) floorf((x - min) / binWidth);}
 
   // Info, statistique et calculs sur les histogrammes
-  int            BinNonNul() const;
-  int            ErrNonNul() const;
-  int            IMax() const;
-  int            IMin() const;
-  float          VMax() const;
-  float          VMin() const;
-  float          Mean() const;
-  float          Sigma() const;
-  float          MeanLH(int il,int ih) const;
-  float          SigmaLH(int il,int ih) const;
-  float          Mean(float x0, float dx) const;
-  float          Sigma(float x0, float dx) const;
-  float          CleanedMean() const;
-  float          CleanedMean(float& sigma) const;
-  int            BinPercent(float per) const;
-  int            BinPercent(float x,float per,int& imin,int& imax);
-  int            BinPercent(float x,float per,float& xmin,float& xmax);
-  void           HInteg(float norm = 0.);
-  void           HDeriv();
-  void           HRebin(int nbinew);
-
-  int            MaxiLocal(float& maxi,int& imax,float& maxn,int& imaxn);
-  float          FitMax(int degree=2, float frac=0.5f, int debug=0) const;
-  float          FindWidth(float xmax,float frac=0.5f, int debug=0) const;
-  float          FindWidth(float frac=0.5f, int debug=0) const;
-  int            EstimeMax(float& xm,int SzPav = 3);
-  int            EstimeMax(int& im,float& xm,int SzPav = 3);
-  void           EstimeWidthS(float frac,float& widthG,float& widthD);
+  int       BinNonNul() const;
+  int       ErrNonNul() const;
+  int       IMax() const;
+  int       IMin() const;
+  float     VMax() const;
+  float     VMin() const;
+  float     Mean() const;
+  float     Sigma() const;
+  float     MeanLH(int il,int ih) const;
+  float     SigmaLH(int il,int ih) const;
+  float     Mean(float x0, float dx) const;
+  float     Sigma(float x0, float dx) const;
+  float     CleanedMean() const;
+  float     CleanedMean(float& sigma) const;
+  int       BinPercent(float per) const;
+  int       BinPercent(float x,float per,int& imin,int& imax);
+  int       BinPercent(float x,float per,float& xmin,float& xmax);
+  void      HInteg(float norm = 0.);
+  void      HDeriv();
+  void      HRebin(int nbinew);
+
+  int       MaxiLocal(float& maxi,int& imax,float& maxn,int& imaxn);
+  float     FitMax(int degree=2, float frac=0.5f, int debug=0) const;
+  float     FindWidth(float xmax,float frac=0.5f, int debug=0) const;
+  float     FindWidth(float frac=0.5f, int debug=0) const;
+  int       EstimeMax(float& xm,int SzPav = 3);
+  int       EstimeMax(int& im,float& xm,int SzPav = 3);
+  void      EstimeWidthS(float frac,float& widthG,float& widthD);
 
   // Fit
@@ -147,22 +148,22 @@
 
   // Print et Display ASCII
-  void           PrintF(FILE * fp, int dyn = 100, float hmin = 1., float hmax = -1.,
-			int pflag = 0, int il = 1, int ih = -1);
-  void           Print(int dyn = 100, float hmin = 1., float hmax = -1.,
-			int pflag = 0, int il = 1, int ih = -1);
+  void PrintF(FILE * fp, int dyn = 100, float hmin = 1., float hmax = -1.,
+		      int pflag = 0, int il = 1, int ih = -1);
+  void Print(int dyn = 100, float hmin = 1., float hmax = -1.,
+		     int pflag = 0, int il = 1, int ih = -1);
 
 protected:
   void Delete();
 
-  float*         data;     //!< donnees
-  double*        err2;	   //!< erreurs carrees
-  float          under;    //!< underflow
-  float          over;     //!< overflow
-  double         nHist;    //!< somme ponderee des entrees
-  int_4          nEntries; //!< nombre d'entrees
-  int_4          bins;     //!< nombre de bins
-  float          min;      //!< abscisse minimum
-  float          max;      //!< abscisse maximum
-  float          binWidth; //!< largeur du bin
+  float*    data;     //!< donnees
+  double*   err2;	   //!< erreurs carrees
+  float     under;    //!< underflow
+  float     over;     //!< overflow
+  double    nHist;    //!< somme ponderee des entrees
+  int_4     nEntries; //!< nombre d'entrees
+  int_4     bins;     //!< nombre de bins
+  float     min;      //!< abscisse minimum
+  float     max;      //!< abscisse maximum
+  float     binWidth; //!< largeur du bin
 };
 
