Changeset 914 in Sophya for trunk/SophyaLib/HiStats/histos.h


Ignore:
Timestamp:
Apr 13, 2000, 6:04:50 PM (25 years ago)
Author:
ansari
Message:

documentation cmv 13/4/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/histos.h

    r763 r914  
    11// This may look like C code, but it is really -*- C++ -*-
    22//
    3 // $Id: histos.h,v 1.1.1.1 2000-03-02 16:51:32 ansari Exp $
     3// $Id: histos.h,v 1.2 2000-04-13 16:04:11 ansari Exp $
    44//
    55
     
    1919class GeneralFit;
    2020
     21
     22/*!
     23  Classe d'histogrammes 1D
     24*/
    2125class Histo : public AnyDataObj {
    2226  friend class ObjFileIO<Histo>;
     
    7781
    7882  // INLINES
     83  //! Retourne l'abscisse minimum
    7984  inline float          XMin() const             {return min;}
     85  //! Retourne l'abscisse maximum
    8086  inline float          XMax() const             {return max;}
     87  //! Retourne le nombre de bins
    8188  inline int_4          NBins() const            {return bins;}
     89  //! Retourne la largeur du bin
    8290  inline float          BinWidth() const         {return binWidth;}
     91  //! Retourne le pointeur sur le tableaux des contenus
    8392  inline float*         Bins() const             {return data;}
     93  //! Retourne le contenu du bin i
    8494  inline float          operator()(int i) const  {return data[i];}
     95  //! Remplit le contenu du bin i
    8596  inline float&         operator()(int i)        {return data[i];}
     97  //! retourne "true" si il y a des erreurs stoquees
    8698  inline bool           HasErrors() { if(err2) return true; else return false;}
     99  //! Retourne l'erreur du bin i
    87100  inline float          Error(int i) const
    88101                          {if(err2) {if(err2[i]>0.) return sqrt(err2[i]); else return 0.;}
    89102                           else return 0.;}
     103  //! Retourne l'erreur au carre du bin i
    90104  inline double         Error2(int i) const
    91105                          {if(err2) return err2[i]; else return 0.;}
     106  //! Remplit l'erreur au carre du bin i
    92107  inline double&        Error2(int i) {return err2[i];}
     108  //! Retourne la somme ponderee
    93109  inline float          NData() const            {return (float) nHist;}
     110  //! Retourne le nombre d'entrees
    94111  inline float          NEntries() const         {return nEntries;}
     112  //! Retourne le nombre d'overflow
    95113  inline float          NOver() const            {return over;}
     114  //! Retourne le nombre d'underflow
    96115  inline float          NUnder() const           {return under;}
    97116
     117  //! Retourne l'abscisse du bord inferieur du bin i
    98118  inline float          BinLowEdge(int i)  const {return min + i*binWidth;}
     119  //! Retourne l'abscisse du centre du bin i
    99120  inline float          BinCenter(int i)   const {return min + (i+0.5)*binWidth;}
     121  //! Retourne l'abscisse du bord superieur du bin i
    100122  inline float          BinHighEdge(int i) const {return min + (i+1)*binWidth;}
     123  //! Retourne le numero du bin contenant l'abscisse x
    101124  inline int_4          FindBin(float x) const   
    102125                            {return (int_4) floorf((x - min) / binWidth);}
     
    146169  void Delete();
    147170
    148   float*         data;           
    149   double*        err2;           
    150   float          under;
    151   float          over;
    152   double         nHist;
    153   int_4          nEntries;
    154   int_4          bins;
    155   float          min;
    156   float          max;
    157   float          binWidth;
     171  float*         data;     //!< donnees
     172  double*        err2;     //!< erreurs carrees
     173  float          under;    //!< underflow
     174  float          over;     //!< overflow
     175  double         nHist;    //!< somme ponderee des entrees
     176  int_4          nEntries; //!< nombre d'entrees
     177  int_4          bins;     //!< nombre de bins
     178  float          min;      //!< abscisse minimum
     179  float          max;      //!< abscisse maximum
     180  float          binWidth; //!< largeur du bin
    158181};
    159182
Note: See TracChangeset for help on using the changeset viewer.