Index: trunk/SophyaLib/BaseTools/dvlist.cc
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.cc	(revision 911)
+++ trunk/SophyaLib/BaseTools/dvlist.cc	(revision 913)
@@ -43,5 +43,14 @@
 
 /*!
+   \class SOPHYA::MuTyV
+   \ingroup SysTools
+   Simple utility class which can be used to hold values of type
+   string, integer (\b int_8) or float (\b r_8) and providing
+   easy conversion methods between these types. 
+*/
+
+/*!
    \class SOPHYA::DVList
+   \ingroup SysTools
    This class can be used to construct list of values associated with names.
    Variables names should not contain space characters and is limited to 64
Index: trunk/SophyaLib/BaseTools/dvlist.h
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.h	(revision 911)
+++ trunk/SophyaLib/BaseTools/dvlist.h	(revision 913)
@@ -20,4 +20,5 @@
 
 // Classe utilitaire pour manipuler des variables typees 
+//! A simple class for holding string, integer and float type values.
 class MuTyV {
 public:
Index: trunk/SophyaLib/BaseTools/machdefs.h
===================================================================
--- trunk/SophyaLib/BaseTools/machdefs.h	(revision 911)
+++ trunk/SophyaLib/BaseTools/machdefs.h	(revision 913)
@@ -342,4 +342,9 @@
 /* ********************************************************/
 
+/* ---- Activation des flags de debug/bound checking  ----- */
+#ifdef SOPHYA_DEBUG
+#define SO_BOUNDCHECKING
+#endif
+
 /* Compatibilite, avant de migrer tout le code en "PLANCK" */
 
Index: trunk/SophyaLib/BaseTools/pexceptions.h
===================================================================
--- trunk/SophyaLib/BaseTools/pexceptions.h	(revision 911)
+++ trunk/SophyaLib/BaseTools/pexceptions.h	(revision 913)
@@ -17,6 +17,8 @@
   string BuildLongExceptionMessage(const char * s, const char *file, int line);
 
-//! Base exception class in Sophya.
-/*! Ancestor for PError and PException
+/*! \ingroup SysTools
+    \brief Base exception class in Sophya
+
+    Ancestor for PError and PException
     It has a message, and an id to give more
     information on the exception.
@@ -41,5 +43,6 @@
 //      PException
   
-//! A PError is a serious logic error. Usually not caught...
+/*! \ingroup SysTools 
+    \brief A PError is a serious logic error. Usually not caught... */
   class PError : public PThrowable {
   public:
@@ -47,5 +50,6 @@
   };
   
-//! A PException is not as serious... Can be caught.
+/*! \ingroup SysTools 
+    \brief A PException is not as serious... Can be caught. */
   class PException : public PThrowable {
   public:
@@ -60,5 +64,6 @@
 //     AssertionFailedError
 
-//! Memory allocation failure
+/*! \ingroup SysTools 
+    \brief Memory allocation failure */
   class AllocationError : public PError {
   public:
@@ -66,5 +71,6 @@
   };
   
-//! Null pointer error
+/*! \ingroup SysTools 
+    \brief Null pointer error */
   class NullPtrError : public PError {
   public:
@@ -73,5 +79,6 @@
   
   
-//! Calling a forbidden method, trying a forbidden operation
+/*! \ingroup SysTools 
+    \brief Calling a forbidden method, trying a forbidden operation */
   class ForbiddenError : public PError {
   public:
@@ -80,5 +87,6 @@
 
   
-//! ASSERT macro failure. The message is the assertion...
+/*! \ingroup SysTools 
+    \brief ASSERT macro failure. The message is the assertion... */
   class AssertionFailedError : public PError {
   public:
@@ -101,5 +109,6 @@
   //   CaughtSignalExc
   
-  //! Generic IO Exception.
+/*! \ingroup SysTools 
+    \brief Generic IO Exception */
   class IOExc : public PException {
   public:
@@ -107,5 +116,6 @@
   };
 
-  //! Bad file format.
+/*! \ingroup SysTools 
+    \brief Bad file format */
   class FileFormatExc : public IOExc {
   public:
@@ -113,5 +123,6 @@
   };
 
-  //! Size mismatch between objects.
+/*! \ingroup SysTools 
+    \brief Size mismatch between objects */
   class SzMismatchError : public PException {
   public:
@@ -119,5 +130,6 @@
   };
   
-  //! Out of bounds for array, matrix, etc.
+/*! \ingroup SysTools 
+    \brief Out of bounds for array, matrix, etc */
   class RangeCheckError : public PException {
   public:
@@ -125,5 +137,6 @@
   };
   
-  //! Invalid parameter to method/constructor...
+/*! \ingroup SysTools 
+    \brief Invalid parameter to method/constructor... */
   class ParmError : public PException {
   public:
@@ -131,5 +144,6 @@
   };
 
-  //! Calling a non available / not implemented method
+/*! \ingroup SysTools 
+    \brief Calling a non available / not implemented method */
   class NotAvailableOperation : public PException {
   public:
@@ -137,5 +151,6 @@
   };
 
-  //! Bad data type -> keep ?
+/*! \ingroup SysTools 
+    \brief Bad data type -> keep ? */
   class TypeMismatchExc : public PException {
   public:
@@ -143,5 +158,6 @@
   };
 
-  //! Math operation exception
+/*! \ingroup SysTools 
+    \brief Math operation exception */
   class MathExc : public PException {
   public:
@@ -149,5 +165,6 @@
   };
   
-  //! Singular matrix 
+/*! \ingroup SysTools 
+    \brief Singular matrix  */
   class SingMatrixExc : public MathExc {
   public:
@@ -155,5 +172,6 @@
   };
 
-  //! Duplicate identifier during registration
+/*! \ingroup SysTools 
+    \brief Duplicate identifier during registration */
   class DuplicateIdExc : public PException {
   public:
@@ -161,5 +179,6 @@
   };
   
-  //! Not found identifier 
+/*! \ingroup SysTools 
+    \brief Not found identifier  */
   class NotFoundExc : public PException {
   public:
@@ -167,5 +186,6 @@
   };
   
-  //! Generated exception when processing a signal
+/*! \ingroup SysTools 
+    \brief Generated exception when processing a signal */
   class CaughtSignalExc : public PException {
   public:
Index: trunk/SophyaLib/BaseTools/sophyainit.cc
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 911)
+++ trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 913)
@@ -18,4 +18,28 @@
 // ---  Classe d'initialisation de SOPHYA, (PPersistMgr en particulier)
 int SophyaInitiator::FgInit = 0;
+
+/*!
+   \namespace SOPHYA
+   \brief This is the namespace for the whole Sophya package
+*/
+
+/*!
+   \defgroup SysTools SysTools module
+   This module contains classes and functions which define the 
+   general framework for \b Sophya package such as the simple
+   persistence, serialisation mechanism through \b PPersist,
+   \b POutPersist, \b PInPersist classes. It contains also
+   few utility classes such as the \b NDataBlock<T>, (template 
+   numerical arrays with reference counting and sharing)
+   \b DataCards and \b PDynLinker (Dynamic link handler) classes.  
+  
+*/
+
+/*!
+  \class SOPHYA::SophyaInitiator
+  \ingroup SysTools
+  Each Sophya module may contain an initialiser class which should
+  be a sub-class of SophyaInitiator.  
+*/
 
 SophyaInitiator::SophyaInitiator()
Index: trunk/SophyaLib/BaseTools/sophyainit.h
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.h	(revision 911)
+++ trunk/SophyaLib/BaseTools/sophyainit.h	(revision 913)
@@ -12,6 +12,7 @@
 double SophyaVersion(void); /* Version + (Revision/1000) */
 
-// Classe d''initialisation pour les modules de PEIDA++
+// Classe d''initialisation pour les modules SOPHYA
 
+//! Initializer class for sophya modules
 class SophyaInitiator {
 private:
Index: trunk/SophyaLib/BaseTools/srandgen.c
===================================================================
--- trunk/SophyaLib/BaseTools/srandgen.c	(revision 911)
+++ trunk/SophyaLib/BaseTools/srandgen.c	(revision 913)
@@ -35,4 +35,24 @@
 */
 
+/*! \defgroup RandGen
+    Random number generators */
+
+/*! \ingroup  SysTools
+    \fn frand01
+    Returns a random number (float) with flat distribution between 0 ... 1
+*/
+/*! \ingroup  SysTools
+    \fn drand01
+    Returns a random number (double) with flat distribution between 0 ... 1
+*/
+/*! \ingroup  SysTools
+    \fn frandpm1() 
+    Returns a random number (float) with flat distribution between -1 ... 1
+*/
+/*! \ingroup  SysTools
+    \fn drandpm1() 
+    Returns a random number (double) with flat distribution between -1 ... 1  
+*/
+
 /*=========================================================================*/
 /*
@@ -43,4 +63,9 @@
 --
 */
+
+/*! \ingroup  SysTools
+    Fast initialisation of the random number generator \c (drand48) 
+    using a \c long type value (cf \c srand48 )
+*/
 void Ini_Ranf_Quick(long seed_val, int lp)
 {
@@ -57,4 +82,8 @@
 	48 bits (cf seed48).
 --
+*/
+/*! \ingroup  SysTools
+    complete initialisation of the random number generator \c (drand48) 
+    using a \c using 48 bits (cf \c seed48 )
 */
 void Ini_Ranf(unsigned short seed_16v[3], int lp)
@@ -73,4 +102,8 @@
 	de 48 bits (cf seed48).
 --
+*/
+/*! \ingroup  SysTools
+    Returns the status (48 bits) of the random number generator \c (drand48) 
+    (cf \c seed48 )
 */
 void Get_Ranf(unsigned short seed_16v[3], int lp)
@@ -102,4 +135,7 @@
 --
 */
+/*! \ingroup  SysTools
+    Automatic initialisation using the present time
+*/
 void Auto_Ini_Ranf(int lp)
 {
@@ -151,4 +187,7 @@
 --
 */
+/*! \ingroup  SysTools
+    Normal (Gaussian) random number generator (Mean=0., Sigma=1.)
+*/
 float NorRand(void)
 {
@@ -190,4 +229,8 @@
 	Generation aleatoire gaussienne de centre "am" et de sigma "s".
 --
+*/
+/*! \ingroup  SysTools
+    Normal (Gaussian) random number generator with the specified mean
+    (\c am ) and sigma (\c s )
 */
 double GauRnd(double am, double s)
Index: trunk/SophyaLib/SUtils/datacards.cc
===================================================================
--- trunk/SophyaLib/SUtils/datacards.cc	(revision 911)
+++ trunk/SophyaLib/SUtils/datacards.cc	(revision 913)
@@ -1,3 +1,3 @@
-// $Id: datacards.cc,v 1.2 2000-04-12 17:49:42 ansari Exp $
+// $Id: datacards.cc,v 1.3 2000-04-13 15:58:38 ansari Exp $
 //
 // Datacards, acquisition EROS II
@@ -38,4 +38,5 @@
 /*! 
     \class SOPHYA::DataCards
+    \ingroup SysTools
     This class can be used for decoding program parameters from an ascii
     file. Each line of the ascii contains a keyword starting with \b @ .
Index: trunk/SophyaLib/SysTools/ctimer.cc
===================================================================
--- trunk/SophyaLib/SysTools/ctimer.cc	(revision 911)
+++ trunk/SophyaLib/SysTools/ctimer.cc	(revision 913)
@@ -1,4 +1,4 @@
 //
-// $Id: ctimer.cc,v 1.3 2000-04-12 17:49:40 ansari Exp $
+// $Id: ctimer.cc,v 1.4 2000-04-13 15:58:37 ansari Exp $
 //
 
@@ -39,4 +39,5 @@
 /*!
   \class SOPHYA::Timer
+  \ingroup SysTools
   This class implements a simple chronometer which can be used for
   measuring the CPU and elapsed time in functions. The constructor
Index: trunk/SophyaLib/SysTools/pdlmgr.cc
===================================================================
--- trunk/SophyaLib/SysTools/pdlmgr.cc	(revision 911)
+++ trunk/SophyaLib/SysTools/pdlmgr.cc	(revision 913)
@@ -1,6 +1,6 @@
-// This may look like C code, but it is really -*- C++ -*-
 // Gestionnaire de lien dynamique   -   R. Ansari 12/98
 // LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
 
+#include "pdlmgr.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -8,5 +8,4 @@
 #include <iostream.h>
 
-#include "pdlmgr.h"
 
 // Extension de noms de fichiers Shared libs
@@ -20,7 +19,25 @@
 /*!
   \class SOPHYA::PDynLinkMgr
+  \ingroup SysTools
   This classes handles the run-time operations related to using shared
   libraries. The present version has been adapted for different Unix 
   flavours (Linux, Compaq/Digital Unix, SGI IRIX, IBM AIX, Sun Solaris).
+  The example here the linking of shared library named "mylib.so" 
+  containing a function \c double \c myfunction(double x). 
+  \code
+  #include "pdlmgr.h"
+  typedef double (* AFunctionOfX) (double x);
+  {
+  // ...
+  string soname = "mylib.so";
+  string funcname = "myfunction";
+  PDynLinkMgr dyl(son);
+  AFunctionOfX f = (AFunctionOfX)dyl.GetFunction(funcname);
+  double x = 3.1425;
+  if (f != NULL) 
+    cout << " X= " << x << " myfunction(x)=" << f(x) << endl;
+  // ...
+  }
+  \endcode
 */
 
Index: trunk/SophyaLib/SysTools/periodic.cc
===================================================================
--- trunk/SophyaLib/SysTools/periodic.cc	(revision 911)
+++ trunk/SophyaLib/SysTools/periodic.cc	(revision 913)
@@ -9,6 +9,15 @@
 
 #include "periodic.h"
+/*!
+  \class SOPHYA::Periodic
+  \ingroup SysTools
+  This class provide the service of calling a given function at 
+  regular intervals. It can also be subclassed with the method 
+  \b DoPeriodic redefined to perform a periodic action.
+*/
 
 /* --Methode-- */
+/*! Constructor with the definition of the interval (in seconds)
+  and an optional user action */
 Periodic::Periodic(int dt, UsPeriodicAction act, void * usp)
 {
@@ -29,4 +38,5 @@
 
 /* --Methode-- */
+/*! Sets the user action function and its data \c usp */
 void Periodic::SetAction(UsPeriodicAction act, void * usp)
 {
@@ -36,4 +46,5 @@
 
 /* --Methode-- */
+/*! Changes the interval \c dt specified in seconds */
 void Periodic::SetInterval(int dt)
 {
@@ -44,4 +55,5 @@
 
 /* --Methode-- */
+/*! Changes the interval \c dtms specified in milli-seconds */
 void Periodic::SetIntervalms(int dtms)
 {
@@ -53,4 +65,5 @@
 
 /* --Methode-- */
+/*! Activate the object */
 void Periodic::Start(int dt)
 {
@@ -69,4 +82,5 @@
 
 /* --Methode-- */
+/*! Deactivate the object */
 void Periodic::Stop()
 {
@@ -86,4 +100,6 @@
 
 /* --Methode-- */
+/*! This method should be redefined for sub-classes of Periodic 
+  The default implementation calls the user action function */
 void Periodic::DoPeriodic()
 {
Index: trunk/SophyaLib/SysTools/psighand.cc
===================================================================
--- trunk/SophyaLib/SysTools/psighand.cc	(revision 911)
+++ trunk/SophyaLib/SysTools/psighand.cc	(revision 913)
@@ -9,12 +9,24 @@
 static bool sigprstate[6] = {false, false, false, false, false, false};
 
-void PeidaProcessSignal(int s);
+void SophyaProcessSignal(int s);
 
 /* Nouvelle-Fonction */
-void PeidaConfigureSignalhandling(bool cfpe, bool csegv, bool cint, bool cquit, bool cusr1, bool cusr2) 
+/*!\ingroup  SysTools 
+   Configures signal handling. When the flag is true, an exception 
+   \b CaughtSignalExc is thrown with the excpetion id set to the 
+   signal id. With the flag is false, the default signal handling
+   is restored.
+   \param cfpe : Floating point exception \c SIGFPE
+   \param csegv : Segmentation fault \c SIGSEGV
+   \param cint : Interrupt signal \c SIGINT
+   \param cquit : Quit signal \c SIGINT
+   \param cusr1 : User signal 1 \c SIGUSR1
+   \param cusr2 : User signal 1 \c SIGUSR2
+*/
+void SOPHYA::SophyaConfigureSignalhandling(bool cfpe, bool csegv, bool cint, bool cquit, bool cusr1, bool cusr2) 
 {
   struct sigaction ae, ad;
 
-  ae.sa_handler = PeidaProcessSignal;
+  ae.sa_handler = SophyaProcessSignal;
   ad.sa_handler = SIG_DFL;
   memset( &(ae.sa_mask), 0, sizeof(sigset_t) ); 
@@ -31,9 +43,9 @@
     if (cfpe)   { 
       sigaction(SIGFPE, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGFPE handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGFPE handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGFPE, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGFPE handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGFPE handling ...");
       }
     sigprstate[0] = cfpe;
@@ -43,9 +55,9 @@
     if (csegv)   { 
       sigaction(SIGSEGV, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGSEGV handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGSEGV handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGSEGV, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGSEGV handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGSEGV handling ...");
       }
     sigprstate[1] = csegv;
@@ -56,9 +68,9 @@
     if (cint)   { 
       sigaction(SIGINT, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGINT handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGINT handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGINT, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGINT handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGINT handling ...");
       }
     sigprstate[2] = cint; 
@@ -69,9 +81,9 @@
     if (cquit)   { 
       sigaction(SIGQUIT, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGQUIT handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGQUIT handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGQUIT, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGQUIT handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGQUIT handling ...");
       }
     sigprstate[3] = cquit; 
@@ -82,9 +94,9 @@
     if (cusr1)   { 
       sigaction(SIGUSR1, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGUSR1 handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGUSR1 handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGUSR1, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGUSR1 handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGUSR1 handling ...");
       }
     sigprstate[4] = cusr1;
@@ -94,9 +106,9 @@
     if (cusr2)   { 
       sigaction(SIGUSR2, &ae, NULL);
-      puts("PeidaConfigureSignalhandling(): Activating SIGUSR2 handling (-> throw) ...");
+      puts("SophyaConfigureSignalhandling(): Activating SIGUSR2 handling (-> throw) ...");
       }
     else  { 
       sigaction(SIGUSR2, &ad, NULL);
-      puts("PeidaConfigureSignalhandling(): Back to default SIGUSR2 handling ...");
+      puts("SophyaConfigureSignalhandling(): Back to default SIGUSR2 handling ...");
       }
     sigprstate[5] = cusr2;
@@ -104,5 +116,5 @@
 }
 /* Nouvelle-Fonction */
-void PeidaProcessSignal(int s)
+void SophyaProcessSignal(int s)
 {
 string msg;
@@ -110,29 +122,29 @@
   {
   case SIGFPE :
-    puts("PeidaProcessSignal: ###Signal SIGFPE catched, throw catchedSIGFPE ###");
+    puts("SophyaProcessSignal: ###Signal SIGFPE catched, throw catchedSIGFPE ###");
     msg = "Caught SIGFPE";
     throw ( CaughtSignalExc(msg, s) );
   case SIGSEGV :
-    puts("PeidaProcessSignal: ###Signal SIGSEGV catched, throw catchedSIGSEGV ###");
+    puts("SophyaProcessSignal: ###Signal SIGSEGV catched, throw catchedSIGSEGV ###");
     msg = "Caught SIGSEGV";
     throw ( CaughtSignalExc(msg, s) );
   case SIGINT :
-    puts("PeidaProcessSignal: ###Signal SIGINT catched, throw catchedSIGINT ###");
+    puts("SophyaProcessSignal: ###Signal SIGINT catched, throw catchedSIGINT ###");
     msg = "Caught SIGINT";
     throw ( CaughtSignalExc(msg, s) );
   case SIGQUIT :
-    puts("PeidaProcessSignal: ###Signal SIGQUIT catched, throw catchedSIGQUIT ###");
+    puts("SophyaProcessSignal: ###Signal SIGQUIT catched, throw catchedSIGQUIT ###");
     msg = "Caught SIGQUIT";
     throw ( CaughtSignalExc(msg, s) );
   case SIGUSR1 :
-    puts("PeidaProcessSignal: ###Signal SIGUSR1 catched, throw catchedSIGUSR1 ###");
+    puts("SophyaProcessSignal: ###Signal SIGUSR1 catched, throw catchedSIGUSR1 ###");
     msg = "Caught SIGUSR1";
     throw ( CaughtSignalExc(msg, s) );
   case SIGUSR2 :
-    puts("PeidaProcessSignal: ###Signal SIGUSR2 catched, throw catchedSIGUSR2 ###");
+    puts("SophyaProcessSignal: ###Signal SIGUSR2 catched, throw catchedSIGUSR2 ###");
     msg = "Caught SIGUSR2";
     throw ( CaughtSignalExc(msg, s) );
   default :
-    printf("PeidaProcessSignal: ###Signal %d catched, throw  inconsistentErr ### \n", s);
+    printf("SophyaProcessSignal: ###Signal %d catched, throw  inconsistentErr ### \n", s);
     msg = "Caught SIG???";
     throw ( CaughtSignalExc(msg, s) );
Index: trunk/SophyaLib/SysTools/psighand.h
===================================================================
--- trunk/SophyaLib/SysTools/psighand.h	(revision 911)
+++ trunk/SophyaLib/SysTools/psighand.h	(revision 913)
@@ -2,10 +2,14 @@
 //  Pour la gestion des signaux a travers des exceptions
 
-#ifndef PSIGHANDLE_SEEN
-#define PSIGHANDLE_SEEN
+#ifndef SOPHYASIGHANDLE_SEEN
+#define SOPHYASIGHANDLE_SEEN
 
 #include "machdefs.h"
-void PeidaConfigureSignalhandling(bool cfpe=false, bool csegv=false, 
-                                  bool cint=false, bool cquit=false, 
-                                  bool cusr1=false, bool cusr2=false); 
+
+namespace SOPHYA {
+void SophyaConfigureSignalhandling(bool cfpe=false, bool csegv=false, 
+                                   bool cint=false, bool cquit=false, 
+                                   bool cusr1=false, bool cusr2=false); 
+} // namespace SOPHYA
+
 #endif
