Index: trunk/SophyaLib/HiStats/basedtable.cc
===================================================================
--- trunk/SophyaLib/HiStats/basedtable.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/basedtable.cc	(revision 2808)
@@ -131,5 +131,13 @@
 }
 
-
+//! Adds a line (or row to the table) with r_8* inout data
+/*! 
+  The data to be added is provided as an array (vector) of double (r_8).
+  The necessary data conversion is performed, depending on each 
+  column's data typeconverted to the data type. 
+  Return the new number of table rows (lines / entries)
+  \param data : Data for each cell of the row to be appended 
+  (data[k] k=0..NbColumns()) 
+*/
 sa_size_t BaseDataTable::AddLine(const r_8* data)
 {
@@ -155,4 +163,13 @@
 }
 
+//! Adds a line (or row to the table) with input data as an array of MuTyV
+/*! 
+  The data to be added is provided as an array (vector) of MuTyV.
+  The MuTyV class conversion operators are used to match against each 
+  cell data type.
+  Return the new number of table rows (lines / entries)
+  \param data : Data (MuTyV*) for each cell of the row to be appended 
+  (data[k] k=0..NbColumns()) 
+*/
 sa_size_t BaseDataTable::AddLine(const MuTyV* data)
 {
@@ -247,6 +264,9 @@
 }
 
-
-//! Prints table definition and number of entries 
+/*! In addition to printing the number of entries and column names, 
+  this method prints also minimum/maximum value for each column. 
+  This information might be computed when the Show() method is called.
+  This may take some time for tables with large number of entries (>~ 10^6)
+*/
 void   BaseDataTable::Show(ostream& os) const 
 {
Index: trunk/SophyaLib/HiStats/basedtable.h
===================================================================
--- trunk/SophyaLib/HiStats/basedtable.h	(revision 2765)
+++ trunk/SophyaLib/HiStats/basedtable.h	(revision 2808)
@@ -18,4 +18,5 @@
 
 namespace SOPHYA {
+//! Interface definition for classes handling data in a table.
 class BaseDataTable : public AnyDataObj , public NTupleInterface {
 public:
@@ -33,22 +34,32 @@
   virtual           ~BaseDataTable();
   
+  //! Adds a column holding integer, named \b cnom
   inline sa_size_t  AddIntegerColumn(const char * cnom) 
   { return AddColumn(IntegerField, cnom); }
+  //! Adds a column holding integer, named \b cnom
   inline sa_size_t  AddIntegerColumn(string const & cnom) 
   { return AddColumn(IntegerField, cnom); }
+  //! Adds a column holding long integer, named \b cnom
   inline sa_size_t  AddLongColumn(const char * cnom) 
   { return AddColumn(LongField, cnom); }
+  //! Adds a column holding long integer, named \b cnom
   inline sa_size_t  AddLongColumn(string const & cnom) 
   { return AddColumn(LongField, cnom); }
+  //! Adds a column holding floating values (r_4), named \b cnom
   inline sa_size_t  AddFloatColumn(const char * cnom) 
   { return AddColumn(FloatField, cnom); }
+  //! Adds a column holding floating values (r_4), named \b cnom
   inline sa_size_t  AddFloatColumn(string const & cnom) 
   { return AddColumn(FloatField, cnom); }
+  //! Adds a column holding double values (r_8), named \b cnom
   inline sa_size_t  AddDoubleColumn(const char * cnom) 
   { return AddColumn(DoubleField, cnom); }
+  //! Adds a column holding double values (r_8), named \b cnom
   inline sa_size_t  AddDoubleColumn(string const & cnom) 
   { return AddColumn(DoubleField, cnom); }
+  //! Adds a column holding character strings, named \b cnom
   inline sa_size_t  AddStringColumn(const char * cnom) 
   { return AddColumn(StringField, cnom); }
+  //! Adds a column holding character strings, named \b cnom
   inline sa_size_t  AddStringColumn(string const & cnom) 
   { return AddColumn(StringField, cnom); }
@@ -69,8 +80,13 @@
 
   // Acces to various counts and parameters
+  //! Return the number of lines (rows) in the table)
   inline sa_size_t  NEntry() const { return mNEnt ; }
+  //! Return the number of columns in the tables (number of cells in a row)  
   inline sa_size_t  NVar() const   { return mNames.size() ; } 
+  //! Return the number of columns in the tables (number of cells in a row)  
   inline sa_size_t  NVars() const   { return mNames.size() ; } 
+  //! Return the segment size (SegDBInterface objects corresponding to columns)  
   inline sa_size_t  SegmentSize() const   { return mSegSz ; } 
+  //! Return the number of segments (SegDBInterface objects corresponding to columns)  
   inline sa_size_t  NbSegments() const   { return mNSeg ; } 
 
@@ -78,17 +94,22 @@
   virtual sa_size_t AddLine(const r_8* data);
   virtual sa_size_t AddLine(const MuTyV * data);
-  
+
+  //! Alias for AddLine()
   inline sa_size_t  Fill(const r_8* data)
   { return AddLine(data); }
+  //! Alias for AddLine()
   inline sa_size_t  Fill(const MuTyV * data);
      
   virtual sa_size_t Extend();
 
-  // Getting a given line (record) information 
+  //! Return the information stored in line \b n of the table 
   virtual MuTyV *   GetLine(sa_size_t n) const ;
-  
+
+  //! Return the index for column name \b nom  
   sa_size_t         IndexNom(char const* nom) const ; 
+  //! Return the index for column name \b nom  
   inline sa_size_t  IndexNom(string const & nom) const 
   { return IndexNom(nom.c_str()); }
+  //! Return the column name for column index \b k
   string            NomIndex(sa_size_t k) const ; 
 
@@ -107,8 +128,10 @@
   virtual void Clear() = 0;
 
-  // ---- ASCII I/O
+  //! Prints the table content - NOT YET IMPLEMENTED !
   void              Print(int num, int nmax=1) const ;
   
+//! Prints table definition and number of entries 
   void              Show(ostream& os) const ; 
+  //! Prints table definition and number of entries on the standard output stream \b cout
   inline void       Show() const { Show(cout) ; } 
   
@@ -144,5 +167,6 @@
   mutable r_8 *  mVarD;    // Pour retourner une ligne de la table
   mutable MuTyV *  mVarMTV;    // Pour retourner une ligne de la table en MuTyV
-  
+
+  //! \cond   Pour pas inclure ds la documentation doxygen
   typedef struct { 
     string nom; 
@@ -150,4 +174,5 @@
     sa_size_t ser;
   } colst;
+  //! \endcond  
   std::vector<colst> mNames;
 
Index: trunk/SophyaLib/HiStats/datatable.cc
===================================================================
--- trunk/SophyaLib/HiStats/datatable.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/datatable.cc	(revision 2808)
@@ -11,8 +11,10 @@
    This class can be used to organize data in table (row-column) form.
    Each column holds homogeneous data (same data type), while different
-   columns can be used for different data types (integer, float, string ...)
+   columns can be used for different data types 
+   (integer, float, string ...).
+   The whole data set is kept in memory.
    \sa SOPHYA::MuTyV
    \sa SOPHYA::BaseDataTable
-   \sa SOPHYA::ObjFileIO<DataTable>
+   \sa SOPHYA::SegDataBlock
 
    \code
@@ -43,5 +45,9 @@
 }
 
-//! copy constructor - shares the data
+//! copy constructor 
+/*!
+  The copy constructur shares the data if \b share=true. 
+  Otherwise, the Clone() method is called to make a complete copy.
+*/
 DataTable::DataTable(DataTable const & a, bool share)
   : BaseDataTable(a.SegmentSize())
@@ -53,5 +59,5 @@
   if (a.mInfo)  mInfo = new DVList(*(a.mInfo));
 }
-
+//! Copy the table structure from \b a and shares the data (columns content)
 void DataTable::Share(DataTable const & a)
 {
@@ -85,4 +91,5 @@
 }
 
+//! Copy the table structure from \b a and duplicate (copy) the data (columns content)
 void DataTable::Clone(DataTable const & a)
 {
@@ -115,5 +122,5 @@
   }  
 }
-
+//! Reset (/clear) the table content and structure
 void DataTable::Clear()
 {
@@ -151,4 +158,9 @@
 
 
+/*! 
+  Implements the action defined in the BaseDataTable interface.
+  In the current implementation, throws an exception (ParmError) 
+  if the table contains some data already.
+*/
 sa_size_t DataTable::AddColumn(FieldType ft, string const & cnom)
 {
Index: trunk/SophyaLib/HiStats/datatable.h
===================================================================
--- trunk/SophyaLib/HiStats/datatable.h	(revision 2765)
+++ trunk/SophyaLib/HiStats/datatable.h	(revision 2808)
@@ -16,4 +16,5 @@
 class FITS_DataTable;
 
+//! An implementation of BaseDataTable with data (columns) stored in memory.
 class DataTable : public BaseDataTable {
 public:
Index: trunk/SophyaLib/HiStats/histinit.cc
===================================================================
--- trunk/SophyaLib/HiStats/histinit.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/histinit.cc	(revision 2808)
@@ -17,5 +17,6 @@
 /*!
    \defgroup HiStats HiStats module
-   This module contains histograms
+   This module contains histograms (1D, 2D) and 
+   classes for management of data sets as tables (NTuple, DataTable ...)
 */
  
@@ -25,6 +26,20 @@
   \class SOPHYA::HiStatsInitiator
   \ingroup HiStats
-  Histograms initiator
+  This class performs the initialisation for HiStats module.
+  More specifically, it registers PPF handlers for the following classes :
+  - Histo
+  - HProf
+  - HistoErr
+  - Histo2D
+  - NTuple
+  - XNTuple
+  - DataTable
+  - SwPPFDataTable
+
+  If the system linker/loader handles correctly static object initialisation, there
+  is no action required when writing programs. If not, an instance of the class must
+  be present before any other operation on the libray classes. 
 */
+
 HiStatsInitiator::HiStatsInitiator()
   : NToolsInitiator()
Index: trunk/SophyaLib/HiStats/ntuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/ntuple.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/ntuple.cc	(revision 2808)
@@ -53,5 +53,5 @@
 
 /* --Methode-- */
-//! Default constructor 
+//! Default constructor - To be used when reading in an NTuple.
 //++
 NTuple::NTuple()
Index: trunk/SophyaLib/HiStats/ntuple.h
===================================================================
--- trunk/SophyaLib/HiStats/ntuple.h	(revision 2765)
+++ trunk/SophyaLib/HiStats/ntuple.h	(revision 2808)
@@ -22,4 +22,5 @@
 class FITS_NTuple;
 
+//! Class for creation and management of double or float data sets in a table
 class NTuple : public AnyDataObj , public NTupleInterface {
 
@@ -28,5 +29,4 @@
   		    NTuple(int nvar, char** noms, int blk=512, bool fgdouble=true);
                     NTuple(const NTuple& NT);
-  //A virer		    NTuple(char* flnm);
   virtual           ~NTuple();
 
@@ -35,17 +35,22 @@
   void              Fill(r_4* x);
   void              Fill(r_8* x);
-
-  inline int_4      NEntry() const  { return(mNEnt); }  
+  //! Return the number of lines (rows) in the table)
+  inline int_4      NEntry() const  { return(mNEnt); }
+  //! Return the number of columns in the tables (number of cells in a row)  
   inline int_4      NVar() const { return(mNVar); }  
+  //! Return the bloc size 
   inline int_4      BLock() const { return(mBlk); }  
 // $CHECK$ Reza 21/10/99 Pourquoi faire BLock() ?
 
+  //! Return the content of the cell for line (row) \b n , column \b k
   float             GetVal(int n, int k)   const;
+  //! Return the content of the cell for line (row) \b and column name \b nom
   inline float	    GetVal(int n, const char* nom) const 
                             { return(GetVal(n, IndexNom(nom)) ); }
   int               IndexNom(const char* nom)  const ;
   char*             NomIndex(int k) const;
-
+  //! Return the content of line \b n as a vector of r_4 (float)
   r_4*	            GetVec(int n, r_4* ret=NULL)  const ;
+  //! Return the content of line \b n as a vector of r_8 (double)
   r_8*	            GetVecD(int n, r_8* ret=NULL)  const ;
 
@@ -55,4 +60,5 @@
   inline void       Show() const { Show(cout); }
 
+  //! Return the associated DVList object 
   DVList&           Info();
 
Index: trunk/SophyaLib/HiStats/swppfdtable.cc
===================================================================
--- trunk/SophyaLib/HiStats/swppfdtable.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/swppfdtable.cc	(revision 2808)
@@ -9,17 +9,37 @@
    This class can be used to organize data in table (row-column) form.
    Each column holds homogeneous data (same data type), while different
-   columns can be used for different data types (integer, float, string ...)
+   columns can be used for different data types 
+   (integer, float, string ...).
+   A PPF stream is used as swap space. Due to limitations in the current
+   implementation of PPF streams, read operations (acces to table data) cannot
+   be performed when a table is being filled. 
+
+   \warning 
+   - When creating a table, the output PPF stream (POutPersist) must not be closed
+   (destroyed) before the call to the SwPPFDataTable object.
+   - It is not possible to make a complete (deep) copy of a table SwPPFDataTable
+   Copy constructor and equal operator shares the data.
+   - Although the destructor  DOES NOT save the 
+   table object itself to the memory. You have to use the << operator on the 
+   output PPF stream being used as swap
+
    \sa SOPHYA::MuTyV
-   \sa SOPHYA::BaseDataTable
-   \sa SOPHYA::ObjFileIO<DataTable>
+   \sa SOPHYA::DataTable
+   \sa SOPHYA::SwSegDataBlock  SOPHYA::PPFDataSwapper
 
    \code
    #include "swppfdtable.h"
    // ...
-   DataTable dt(64);
+   {
+   // ---- Creation of the table
+   // Create the swap stream 
+   POutPersist so("myswtable.ppf");
+   SwPPFDataTable dt(so, 64);
+   // define table columns
    dt.AddFloatColumn("X0_f");
    dt.AddFloatColumn("X1_f");
    dt.AddDoubleColumn("X0X0pX1X1_d");
-   double x[5];
+   // Fill the table
+   MuTyV x[5];
    for(int i=0; i<63; i++) {
      x[0] = (i%9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
@@ -28,12 +48,19 @@
    // Printing table info
    cout << dt ;
-   // Saving object into a PPF file
-   POutPersist po("dtable.ppf");
-   po << dt ;
+   // Swap out all data and write the table structure to the PPF stream 
+   so << dt ;
+   // ....
+   }
+   {
+   // ---- Accessing information from a previously created table
+   SwPPFDataTable dt;
+   PInPersist si("myswtable.ppf");
+   si >> dt;
+   // Printing table info
+   cout << dt ;   
+   }
    \endcode
 */
-/*! Default constructor with optional specification of block (or segment) size - 
-    NOT intented for general use 
-*/
+//! Default constructor with optional specification of block (or segment) size 
 SwPPFDataTable::SwPPFDataTable(sa_size_t segsz)
   : BaseDataTable(segsz),
@@ -205,4 +232,9 @@
 
 
+/*! 
+  Implements the action defined in the BaseDataTable interface.
+  In the current implementation, throws an exception (ParmError) 
+  if the table contains some data already.
+*/
 sa_size_t SwPPFDataTable::AddColumn(FieldType ft, string const & cnom)
 {
@@ -271,4 +303,9 @@
 }
 
+//! Adds a line (or row to the table) with r_8* input data.
+/*! 
+  The min/max values for each column is updated, in addition 
+  to the actions performed by the base class AddLine()
+*/
 sa_size_t SwPPFDataTable::AddLine(const r_8* data)
 {
@@ -284,4 +321,9 @@
 }
 
+//! Adds a line (or row to the table) with input data as an array of MuTyV
+/*! 
+  The min/max values for each column is updated, in addition 
+  to the actions performed by the base class AddLine()
+*/
 sa_size_t SwPPFDataTable::AddLine(const MuTyV * data)
 {
Index: trunk/SophyaLib/HiStats/swppfdtable.h
===================================================================
--- trunk/SophyaLib/HiStats/swppfdtable.h	(revision 2765)
+++ trunk/SophyaLib/HiStats/swppfdtable.h	(revision 2808)
@@ -15,4 +15,5 @@
 namespace SOPHYA {
 
+//! An implementation of BaseDataTable with using a PPF stream as swap space.
 class SwPPFDataTable : public BaseDataTable {
 public:
@@ -36,5 +37,5 @@
   friend class ObjFileIO<BaseDataTable> ;
   
-  //! Reset the table content and structure
+  //! Reset(Clear) the table content and structure
   virtual void Clear();
   /*! This method should be called in order to empty the swapout buffer, 
@@ -64,5 +65,7 @@
   // un comptage de reference pour le detruire lorsque tous les tables
   // l'utilisant sont supprimes
+  //! \cond    Pour NE PAS inclure dans la doc
   typedef struct { PInPersist* pis; uint_4 refcnt; } St_InSwap; 
+  //! \endcond 
   St_InSwap * mSwIn;
 }; 
Index: trunk/SophyaLib/HiStats/xntuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/xntuple.cc	(revision 2765)
+++ trunk/SophyaLib/HiStats/xntuple.cc	(revision 2808)
@@ -24,5 +24,11 @@
    columns with int, float or string type content. In addition, this class
    can handle large data sets, using swap space on disk.
-   \sa SOPHYA::ObjFileIO<XNTuple>
+
+   \sa SOPHYA::BaseDataTable SOPHYA::DataTable SOPHYA::SwPPFDataTable
+
+   \deprecated 
+   This class is being deprecated. Use classes derived from SOPHYA::BaseDataTable 
+   whenever possible
+
 
    \code
Index: trunk/SophyaLib/HiStats/xntuple.h
===================================================================
--- trunk/SophyaLib/HiStats/xntuple.h	(revision 2765)
+++ trunk/SophyaLib/HiStats/xntuple.h	(revision 2808)
@@ -27,4 +27,5 @@
 // Bloc de donnees 
 // 
+//! \cond  Pour ne pas inclure dans la documentation
 struct NTBlk
 {
@@ -41,8 +42,9 @@
     char*    sdata ;  
 } ; 
-
+//! \endcond
 //  Forward class declaration for Fits handler
 class FITS_XNTuple;
 
+//! Class for creation and management of data sets organised as a table
 class XNTuple : public AnyDataObj , public NTupleInterface {
 public:
