Index: trunk/SophyaLib/BaseTools/dvlist.cc
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.cc	(revision 3567)
+++ trunk/SophyaLib/BaseTools/dvlist.cc	(revision 3572)
@@ -115,5 +115,5 @@
 /* --Methode-- */
 /*! Copy constructor - Object initialized using the PPF file \b flnm */
-DVList::DVList(char *flnm)
+DVList::DVList(const char *flnm)
 {
 PInPersist s(flnm);
@@ -192,5 +192,5 @@
 // int_8   GetI(string const& key, int_8  def=-1)
 // r_8     GetD(string const& key, r_8 def=-9.e19)
-// string  GetS(string const& key, char* def="")
+// string  GetS(string const& key, const char* def="")
 //	Retourne la valeur de la variable de nom "key" et de type entier, réél, 
 //	chaine de caracteres.
@@ -245,5 +245,5 @@
 /*! Returns the value corresponding to name \b key, converted to string
     Default value \b def is returned if name \b key not found */
-string      DVList::GetS(string const& key, char* def) const
+string      DVList::GetS(string const& key, const char* def) const
 {
 ValList::const_iterator it = mvlist.find(key);
@@ -265,5 +265,5 @@
 // void  SetD(string const& key, r_8 val)
 // void  SetZ(string const& key, complex<r_8> val)
-// void  SetS(string const& key, char*  val)
+// void  SetS(string const& key, const char*  val)
 // void  SetS(string const& key, string val)
 //	Crée la variable de nom "key", de type entier, double, complexe, string et 
@@ -322,5 +322,5 @@
 /* --Methode-- */
 /*! Appends or sets the string value \b val in the list with name \b key */
-void        DVList::SetS(string const& key, char const* val)
+void        DVList::SetS(string const& key, const char * val)
 {
 MuTyV div(val);
Index: trunk/SophyaLib/BaseTools/dvlist.h
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.h	(revision 3567)
+++ trunk/SophyaLib/BaseTools/dvlist.h	(revision 3572)
@@ -25,5 +25,5 @@
                     DVList();
                     DVList(const DVList&);
-                    DVList(char *flnm);
+                    DVList(const char *flnm);
 
   virtual           ~DVList();
@@ -35,12 +35,12 @@
 
   //! Returns the number of elements (variables) in DVList object 
-  inline int	    Size() { return(mvlist.size()); }
+  inline size_t     Size() const { return(mvlist.size()); }
   //! Returns the number of elements (variables) in DVList object 
-  inline int	    NVar() { return(mvlist.size()); }
+  inline size_t     NVar() const { return(mvlist.size()); }
 
   int_8             GetI(string const& key, int_8 def=-1) const;
   r_8               GetD(string const& key, r_8 def=-9.e19) const;
   complex<r_8>      GetZ(string const& key, complex<r_8> def=-9.e19) const;
-  string            GetS(string const& key, char* def="") const;
+  string            GetS(string const& key, const char* def="") const;
   string            GetComment(string const& key) const;
 
@@ -51,5 +51,5 @@
   void              SetD(string const& key, r_8 val);
   void              SetZ(string const& key, complex<r_8> val);
-  void              SetS(string const& key, char const*  val);
+  void              SetS(string const& key, const char *  val);
   void              SetS(string const& key, string const& val);
   void              SetT(string const& key, TimeStamp const& val);
Index: trunk/SophyaLib/BaseTools/ppfbinstream.cc
===================================================================
--- trunk/SophyaLib/BaseTools/ppfbinstream.cc	(revision 3567)
+++ trunk/SophyaLib/BaseTools/ppfbinstream.cc	(revision 3572)
@@ -511,5 +511,5 @@
 	GetI8(i8);  // nb objets toplevel
 	GetU8(ui8); // nb de nametag
-	for(int kt=0; kt<ui8; kt++) {
+	for(uint_8 kt=0; kt<ui8; kt++) {
 	  GetRawI4(i4);
 	  s->seekg(i4,ios::cur);
@@ -994,5 +994,5 @@
   int_4 tsz;
   GetRawI4(tsz);
-  if (tsz != sz)
+  if (tsz != (int_4)sz)
     throw FileFormatExc("PPFBinaryInputStream::GetPosTagTable Size mismatch ");
   for(int kk=0; kk<tsz; kk++)
@@ -1036,5 +1036,5 @@
   // Pour indenter lors de l'impression 
   #define _MXINDENT_ 10 
-  char * indents[_MXINDENT_+1] = {"","  ", "    ", "      ", "        ", "          ",
+  const char * indents[_MXINDENT_+1] = {"","  ", "    ", "      ", "        ", "          ",
 				    "            ", "              ", "                ",
 				    "                  ", "                    "};
@@ -1150,5 +1150,5 @@
 	  GetI8s(stats,8); 
 	  GetRawU8(ui8); // nb de nametag
-	  for(int kt=0; kt<ui8; kt++) {
+	  for(uint_8 kt=0; kt<ui8; kt++) {
 	    string tname;
 	    GetRawI8(i8);
Index: trunk/SophyaLib/BaseTools/sophyainit.cc
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3567)
+++ trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3572)
@@ -193,5 +193,5 @@
 double SophyaInitiator::GetVersion(string& svers)
 {
-  char* compiler = 0;
+  const char* compiler = 0;
   #ifdef __GNUG__
   compiler = "gcc " __VERSION__;
Index: trunk/SophyaLib/BaseTools/sversion.h
===================================================================
--- trunk/SophyaLib/BaseTools/sversion.h	(revision 3567)
+++ trunk/SophyaLib/BaseTools/sversion.h	(revision 3572)
@@ -3,6 +3,6 @@
 
 #define SOPHYA_VERSION   2.1
-#define SOPHYA_REVISION  25
-#define SOPHYA_TAG       "V_Sep2008"
+#define SOPHYA_REVISION  30
+#define SOPHYA_TAG       "V_Fev2009"
 
 #endif
Index: trunk/SophyaLib/HiStats/Makefile
===================================================================
--- trunk/SophyaLib/HiStats/Makefile	(revision 3567)
+++ trunk/SophyaLib/HiStats/Makefile	(revision 3572)
@@ -4,8 +4,8 @@
  
 clean:
-	 rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
+	 rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
 	rm -f $(SOPHYALIBP)libHiStats.a
  
-$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
+$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
@@ -228,7 +228,6 @@
   $(SOPHYAINCP)utils.h hisprof.h histerr.h \
   hist2err.h $(SOPHYAINCP)tmatrix.h ntuple.h \
-  ntupintf.h $(SOPHYAINCP)dvlist.h xntuple.h \
-  datatable.h basedtable.h \
-  $(SOPHYAINCP)segdatablock.h \
+  ntupintf.h $(SOPHYAINCP)dvlist.h datatable.h \
+  basedtable.h $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)thsafeop.h swppfdtable.h \
   $(SOPHYAINCP)swsegdb.h \
@@ -384,20 +383,2 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swppfdtable.cc
  
-$(SOPHYAOBJP)xntuple.o: xntuple.cc $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)perrors.h xntuple.h \
-  $(SOPHYAINCP)machdefs.h ntupintf.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h
-	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  xntuple.cc
- 
Index: trunk/SophyaLib/HiStats/histats.h
===================================================================
--- trunk/SophyaLib/HiStats/histats.h	(revision 3567)
+++ trunk/SophyaLib/HiStats/histats.h	(revision 3572)
@@ -9,5 +9,4 @@
 #include "hist2err.h"
 #include "ntuple.h"
-#include "xntuple.h"
 #include "datatable.h"
 #include "swppfdtable.h"
Index: trunk/SophyaLib/HiStats/histinit.cc
===================================================================
--- trunk/SophyaLib/HiStats/histinit.cc	(revision 3567)
+++ trunk/SophyaLib/HiStats/histinit.cc	(revision 3572)
@@ -12,5 +12,4 @@
 #include "hist2err.h"
 #include "ntuple.h"
-#include "xntuple.h"
 #include "datatable.h"
 #include "swppfdtable.h"
@@ -39,5 +38,4 @@
   - Histo2DErr
   - NTuple
-  - XNTuple
   - DataTable
   - SwPPFDataTable
@@ -70,6 +68,4 @@
   PPRegister(ObjFileIO<NTuple>);
   DObjRegister(ObjFileIO<NTuple>, NTuple);
-  PPRegister(ObjFileIO<XNTuple>);
-  DObjRegister(ObjFileIO<XNTuple>, XNTuple);
 
   PPRegister(ObjFileIO<BaseDataTable>);
Index: trunk/SophyaLib/HiStats/histos.cc
===================================================================
--- trunk/SophyaLib/HiStats/histos.cc	(revision 3567)
+++ trunk/SophyaLib/HiStats/histos.cc	(revision 3572)
@@ -1550,5 +1550,5 @@
 
 // Ecriture entete pour identifier facilement
-sprintf(strg,"V_2 mBins=%6d  NEnt=%15d  errok=%1d",dobj->mBins,dobj->nEntries,errok);
+sprintf(strg,"V_2 mBins=%6d  NEnt=%15llu  errok=%1d",dobj->mBins,dobj->nEntries,errok);
 os.PutLine(strg);
 sprintf(strg,"binw=%g  mMin=%g mMax=%g",dobj->binWidth,dobj->mMin,dobj->mMax);
Index: trunk/SophyaLib/HiStats/ntuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/ntuple.cc	(revision 3567)
+++ trunk/SophyaLib/HiStats/ntuple.cc	(revision 3572)
@@ -26,5 +26,5 @@
    #include "ntuple.h"
    // ...
-   char * names[3] = {"XPos", "YPos", "Val"};
+   const char * names[3] = {"XPos", "YPos", "Val"};
    // NTuple (Table) creation with 3 columns (double precision)
    NTuple  nt(3, names);
@@ -73,8 +73,8 @@
 
 
-//! Constructor with specification of number of columns and column name
+//! Constructor with specification of number of columns and column names
 /*!
   \param nvar : Number of columns in the table 
-  \param noms : Array of column names (length(name) < 8 characters) 
+  \param noms : Array of column names
   \param blk : Optional argument specifying number of table lines
   in a given data block
@@ -90,33 +90,35 @@
 //--
 {
-mNVar = mNEnt = mBlk = mNBlk = 0;
-mVar = NULL;
-mVarD = NULL;
-mInfo = NULL;
-mThS = NULL; 
-if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) "); 
-mNVar = nvar;
-mVar = new r_4[nvar];
-mVarD = new r_8[nvar];
-if (blk < 10) blk = 10;
-mBlk = blk;
-
-if (fgdouble) {
-  r_8* pt = new r_8[nvar*blk];
-  mNBlk = 1;
-  mPtrD.push_back(pt);
-  mFgDouble = true;
-}
-else { 
-  r_4* pt = new r_4[nvar*blk];
-  mNBlk = 1;
-  mPtr.push_back(pt);
-  mFgDouble = false;
-}
+if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with char** noms"); 
+Initialize(nvar,blk,fgdouble);
 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
 return;
 }
 
-//! Constructor with specification of number of columns and column name
+
+//! Constructor with specification of number of columns and column names
+/*!
+  \param nvar : Number of columns in the table 
+  \param noms : Array of column names
+  \param blk : Optional argument specifying number of table lines
+  in a given data block
+  \param fgdouble : if \b true: internal data kept as double precision values (r_8),
+  simple precision (r_4) otherwise
+ */
+//++
+NTuple::NTuple(int nvar, const char** noms, int blk, bool fgdouble)
+//
+//	Createur d'un ntuple de `nvar' variables dont les
+//	noms sont dans le tableau de chaines de caracteres `noms'
+//	avec `blk' d'evenements par blocks.
+//--
+{
+if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with const char** noms"); 
+Initialize(nvar,blk,fgdouble);
+for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
+return;
+}
+
+//! Constructor with specification of number of columns and column names as a string vector
 /*!
   \param noms : Array of column names (length(name) < 8 characters) 
@@ -128,4 +130,16 @@
 NTuple::NTuple(vector<string>& noms, int blk, bool fgdouble)
 {
+int nvar = noms.size();
+if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with vector<string>& noms");
+Initialize(nvar,blk,fgdouble);
+for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
+return;
+}
+
+
+/* --Methode-- */
+/* Initialisation pour Createurs (fonction privee) */
+void NTuple::Initialize(int nvar, int blk, bool fgdouble)
+{
 mNVar = mNEnt = mBlk = mNBlk = 0;
 mVar = NULL;
@@ -133,6 +147,4 @@
 mInfo = NULL;
 mThS = NULL; 
-int nvar = noms.size();
-if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) "); 
 mNVar = nvar;
 mVar = new r_4[nvar];
@@ -153,5 +165,5 @@
   mFgDouble = false;
 }
-for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
+
 return;
 }
@@ -206,4 +218,5 @@
 Clean();
 }
+
 /* --Methode-- */ 
 /*!
@@ -494,5 +507,5 @@
 //--
 {
-char * tt = "float"; 
+const char * tt = "float"; 
 if (mFgDouble) tt = "double";
 os << "NTuple T=" << tt << " : NVar= " << mNVar << " NEnt=" << mNEnt  
Index: trunk/SophyaLib/HiStats/ntuple.h
===================================================================
--- trunk/SophyaLib/HiStats/ntuple.h	(revision 3567)
+++ trunk/SophyaLib/HiStats/ntuple.h	(revision 3572)
@@ -30,4 +30,5 @@
   NTuple();
   NTuple(int nvar, char** noms, int blk=512, bool fgdouble=true);
+  NTuple(int nvar, const char** noms, int blk=512, bool fgdouble=true);
   NTuple(vector<string>& noms, int blk=512, bool fgdouble=true);
   NTuple(const NTuple& NT);
@@ -96,4 +97,5 @@
 
 private:
+  void Initialize(int nvar, int blk, bool fgdouble);
   void  Clean();
 
Index: trunk/SophyaLib/HiStats/objlist.list
===================================================================
--- trunk/SophyaLib/HiStats/objlist.list	(revision 3567)
+++ trunk/SophyaLib/HiStats/objlist.list	(revision 3572)
@@ -12,3 +12,2 @@
 proxtuple.o
 swppfdtable.o
-xntuple.o
Index: trunk/SophyaLib/HiStats/proxtuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/proxtuple.cc	(revision 3567)
+++ trunk/SophyaLib/HiStats/proxtuple.cc	(revision 3572)
@@ -41,5 +41,5 @@
   if (_tuple==0) {
     char** names=new char* [N];
-    for (int i=0;i<N;i++) names[i]=const_cast<char*>(_name[i].c_str());
+    for (int i=0;i<N;i++) names[i]=const_cast<char *>(_name[i].c_str());
     _tuple=new NTuple(N,names);
     delete[] names;
@@ -52,4 +52,3 @@
   _val.clear();
 
-
 }
Index: trunk/SophyaLib/HiStats/smakefile
===================================================================
--- trunk/SophyaLib/HiStats/smakefile	(revision 3567)
+++ trunk/SophyaLib/HiStats/smakefile	(revision 3572)
@@ -4,8 +4,8 @@
  
 clean:
-	 rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
+	 rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
 	rm -f $(SOPHYALIBP)libHiStats.a
  
-$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
+$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
@@ -228,7 +228,6 @@
   $(SOPHYAINCP)utils.h hisprof.h histerr.h \
   hist2err.h $(SOPHYAINCP)tmatrix.h ntuple.h \
-  ntupintf.h $(SOPHYAINCP)dvlist.h xntuple.h \
-  datatable.h basedtable.h \
-  $(SOPHYAINCP)segdatablock.h \
+  ntupintf.h $(SOPHYAINCP)dvlist.h datatable.h \
+  basedtable.h $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)thsafeop.h swppfdtable.h \
   $(SOPHYAINCP)swsegdb.h \
@@ -384,20 +383,2 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swppfdtable.cc
  
-$(SOPHYAOBJP)xntuple.o: xntuple.cc $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)perrors.h xntuple.h \
-  $(SOPHYAINCP)machdefs.h ntupintf.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h
-	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  xntuple.cc
- 
Index: trunk/SophyaLib/HiStats/xntuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/xntuple.cc	(revision 3567)
+++ 	(revision )
@@ -1,1018 +1,0 @@
-#include <string.h>
-#include "ppersist.h"
-#include "perrors.h"
-#include "xntuple.h"
-#ifdef Darwin
-#include <unistd.h>
-#endif
-
-namespace SOPHYA {
-
-#define LENNAME 31 
-#define MAXLEN 128
-#define BADVAL -1.e19
-
-/*!
-   \class XNTuple
-   \ingroup HiStats
-   NTuple class (a Table or 2-D data set) with the possibility of having
-   columns with int, float or string type content. In addition, this class
-   can handle large data sets, using swap space on disk.
-
-   \sa SOPHYA::BaseDataTable SOPHYA::DataTable SOPHYA::SwPPFDataTable
-
-   \deprecated 
-   This class is being deprecated. Use classes derived from SOPHYA::BaseDataTable 
-   whenever possible
-
-
-   \code
-   #include "xntuple.h"
-   // ...
-   char * names[4] = {"X", "X2", "XInt","XStr"};
-   // XNTuple (Table) creation with 4 columns, of integer, 
-   // double(2) and string type
-   XNTuple  xnt(2,0,1,1, names);
-   // Filling the NTuple
-   r_8 xd[2];
-   int_4 xi[2];
-   char xss[2][32];
-   char * xs[2] = {xss[0], xss[1]} ;
-   for(int i=0; i<50; i++) {
-     xi[0] = i;  xd[0] = i+0.5;  xd[1] = xd[0]*xd[0];
-     sprintf(xs[0],"X=%g", xd[0]);
-     xnt.Fill(xd, NULL, xi, xs);
-   }
-   // Printing table info
-   cout << xnt ;
-   // Saving object into a PPF file
-   POutPersist po("xnt.ppf");
-   po << xnt ;
-   \endcode
-   
-*/
-
-//++
-// Class	XNTuple
-// Lib		Outils++ 
-// include	xntuple.h
-//
-//	Classe de ntuples
-//--
-//++
-// Links	Parents
-// PPersist
-// NTupleInterface
-//--
-//++
-// Links	Voir aussi
-// NTuple
-//--
-
-
-char* XNTuple::glob_swp = NULL ; 
-long int  XNTuple::NbNT = 0 ; 
-
-
-NTBlk::NTBlk(int ndvar, int nfvar, int nivar, int nsvar, int strsz, int sz) 
-    : sw(0), // pas swappe 
-      swoff(-1), 
-      ddata(NULL), fdata(NULL), 
-      idata(NULL), sdata(NULL)
-{
-    if(ndvar) ddata = new r_8[ndvar*sz] ; 
-    if(nfvar) fdata = new r_4[nfvar*sz] ; 
-    if(nivar) idata = new int_4[nivar*sz] ; 
-    if(nsvar) sdata = new char[nsvar*(strsz+1)*sz] ; 
-}
-
-NTBlk::~NTBlk()
-{
-    free() ; 
-}
-
-void NTBlk::free() 
-{
-    if(ddata) delete[] ddata ; ddata = NULL ; 
-    if(fdata) delete[] fdata ; fdata = NULL ; 
-    if(idata) delete[] idata ; idata = NULL ; 
-    if(sdata) delete[] sdata ; sdata = NULL ; 
-}
-
-// 
-// relit bloc ds fichier swap 
-// (seulement si bloc n'est plus en memoire) 
-// 
-void XNTuple::read_blk(NTBlk* blk) const 
-{
-    // deja en memoire ? 
-    if( !blk->sw ) return ;  
-    
-    blk->free() ; 
-    
-    // On va --> blk 
-    fseek(swf, blk->swoff, SEEK_SET) ; 
-    
-    if(mD) { 
-	blk->ddata = new r_8[mD*mBlkSz] ; 
-	fread(blk->ddata, sizeof(r_8), mD*mBlkSz, swf) ; 
-    }
-    if(mF) { 
-	blk->fdata = new r_4[mF*mBlkSz] ; 
-	fread(blk->fdata, sizeof(r_4), mF*mBlkSz, swf) ; 
-    }
-    if(mI) { 
-	blk->idata = new int_4[mI*mBlkSz] ; 
-	fread(blk->idata, sizeof(int_4), mI*mBlkSz, swf) ; 
-    }
-    if(mS) { 
-	blk->sdata = new char[mS*(mStrSz+1)*mBlkSz] ; 
-	fread(blk->sdata, sizeof(char), mS*mBlkSz*(mStrSz+1), swf) ; 
-    }
-}
-
-// 
-// swappe le bloc present en memoire 
-// depuis le + longtemps 
-// 
-void XNTuple::swap() const 
-{
-    // fichier de swap ouvert ? 
-    if(!swf) { 
-	swf_name = new char[swp.length()+64] ; 
-	strncpy(swf_name, swp.c_str(), swp.length()+1) ; 
-	strcat(swf_name, "NTupleXXXXXX") ; 
-	//	swf_name = strdup("NTupleXXXXXX") ; 
-	mktemp(swf_name) ; 
-	swf = fopen(swf_name, "w+") ; 
-	if(!swf) throw IOExc("XNTuple::swap() - Error opening swap File");
-    }
-    
-    // bloc a swapper 
-    NTBlk* blk = sw.front() ; 
-    
-    // bloc dans fichiers de swap ? 
-    //    if( blk->swoff > 0 ) 
-    write_blk(blk) ; 
-    blk->free() ; 
-    
-    blk->sw = 1 ; // on marque le bloc swappe 
-    sw.pop_front() ; // on le vire de la liste de swap 
-    mNSwBlk++ ; 
-}
-
-
-// 
-// unswap() 
-// 
-void XNTuple::get_blk(int i) const 
-{
-    if(i<0 || i>=mNBlk) return ; 
-    read_blk(ptr[i]) ; 
-    ptr[i]->sw = 0 ; 
-    sw.push_back(ptr[i]) ; 
-    mNSwBlk-- ; 
-}
-
-
-// 
-// ecrit le bloc en bout de fichier 
-// (seulement si swoff < 0 ) 
-// 
-void XNTuple::write_blk(NTBlk* blk) const 
-{
-    // deja swappe ? 
-    if( blk->swoff >= 0 ) return ; 
-    fseek(swf, 0, SEEK_END) ; 
-    // position debut du bloc 
-    blk->swoff = ftell(swf) ; 
-    if(blk->ddata) fwrite(blk->ddata, sizeof(r_8), mD*mBlkSz, swf) ; 
-    if(blk->fdata) fwrite(blk->fdata, sizeof(r_4),  mF*mBlkSz, swf) ; 
-    if(blk->idata) fwrite(blk->idata, sizeof(int_4),  mI*mBlkSz, swf) ; 
-    if(blk->sdata) fwrite(blk->sdata, sizeof(char),   mS*mBlkSz*(mStrSz+1), swf) ; 
-}
-
-
-void  XNTuple::add_blk() 
-{
-    // l'ancien bloc en ecriture peut maintenant 
-    // etre swappe (s'il existe) 
-    if(mBlk>=0) sw.push_back(ptr[mBlk]) ; 
-    
-    // si pas de place, on swappe 
-    if( mNBlk+1 >= mMaxBlk ) swap() ; 
-    
-    // nouveau bloc 
-    NTBlk* tmp = new NTBlk(mD, mF, mI, mS, mStrSz, mBlkSz) ; 
-    ptr.push_back(tmp) ; 
-    
-    //    mNBlk++ ; 
-    //    mOff = 0 ; 
-    //    mBlk++ ; 
-}
-
-
-XNTuple::XNTuple()
-    : mNEnt(0), mNBlk(0), mNSwBlk(0), 
-      mBlkSz(0), mBlk(-1), mOff(0), 
-      mMaxBlk(0), mStrSz(0), 
-      mD(0), mF(0), mI(0), mS(0), 
-      mVarD(NULL), mMin(NULL), mMax(NULL), 
-      mNVars(0), mNames(NULL), 
-  swf(NULL), swf_name(NULL), mInfo(NULL)
-{
-    if(!glob_swp) SetSwapPath() ; 
-    swp = glob_swp ; 
-    NbNT++ ; 
-}
-
-//++
-// Titre	Constructeurs
-//--
-//++
-// XNTuple(int ndvar, int nfvar, int nivar, int nsvar, char** vnames, -
-//	   int blk=512, int maxblk=100, int strsz=30)
-//	Constructeur - Création d'un XNTuple de "ndvar" variables de type "r_8", -
-//                      "nfvar" de type "r_4", "nivar" de type "int" et "nsvar" de type -
-//                      "char*". 
-//|            * "blk"    = taille blocs de données (en nombre d'entrées) 
-//|            * "maxblk" = nombre max de blocs présents en mémoire (non swappés) 
-//|            * "strsz"  = taille des données de type char* 
-// XNTuple(XNTuple const& nt)
-//	Constructeur de copie.
-// XNTuple(string const& flnm)
-//	Constructeur - lecture à partir d'un fichier PPersist.
-//--
-
-//! Constructor with specification colum types and names
-/*!
-  \param ndvar : Number of columns with type double (r_8)
-  \param nfvar : Number of columns with type float (r_4)
-  \param nivar : Number of columns with type integer (int_4)
-  \param nsvar : Number of columns with type string
-  \param vnames : Column names (in the order r_8 r_4 int_4 string)
-  (colum names are limited to 31 characters)
-  \param blk : data block size (in number of table lines)
-  \param maxblk : Maximum number of data block in memory
-  \param strsz : string length (for string type columns)
- */
-XNTuple::XNTuple(int ndvar, int nfvar, int nivar, int nsvar, 
-		   char** vnames, 
-		   int blk, int maxblk, int strsz)
-    : mNEnt(0), mNBlk(0), mNSwBlk(0), 
-      mBlkSz(blk), mBlk(-1), mOff(0), 
-      mMaxBlk(maxblk), mStrSz(strsz), 
-      mD(ndvar), mF(nfvar), mI(nivar), mS(nsvar), 
-      mVarD(NULL), mMin(NULL), mMax(NULL), 
-      mNVars(ndvar+nfvar+nivar+nsvar), mNames(NULL), 
-      swf(NULL), swf_name(NULL), mInfo(NULL)
-{
-    if(!glob_swp) SetSwapPath() ; 
-    swp = glob_swp ; 
-    
-    mVarD = new r_8[mNVars] ; 
-    mMin  = new r_8[mD+mF+mI] ; 
-    int i;
-    for(i = 0 ; i < (mD+mF+mI) ; i++) mMin[i] =  9E19 ; 
-    mMax  = new r_8[mD+mF+mI] ; 
-    for(i = 0 ; i < (mD+mF+mI) ; i++) mMax[i] = -9E19 ; 
-    
-    if(mNVars) mNames = new char[mNVars*(LENNAME+1)] ; 
-    memset(mNames, 0, mNVars*(LENNAME+1));
-    for(i = 0 ; i < mNVars ; i++)
-      strncpy(mNames+i*(LENNAME+1), vnames[i], LENNAME);
-
-    NbNT++ ; 
-}
-
-
-
-//! Constructor with table initialized from a PPF file
-XNTuple::XNTuple(string const& flnm) 
-    : mNEnt(0), mNBlk(0), mNSwBlk(0), 
-      mBlkSz(0), mBlk(-1), mOff(0), 
-      mMaxBlk(0), mStrSz(0), 
-      mD(0), mF(0), mI(0), mS(0), 
-      mVarD(NULL), mMin(NULL), mMax(NULL), 
-      mNVars(0), mNames(NULL), 
-      swf(NULL), swf_name(NULL), mInfo(NULL)
-{
-    if(!glob_swp) SetSwapPath() ; 
-    swp = glob_swp ; 
-    
-    PInPersist s(flnm);
-    ObjFileIO<XNTuple> fiont(this);
-    fiont.Read(s);
-    NbNT++ ; 
-}
-
-
-//! Copy constructor - Copies the table definition and associated data 
-XNTuple::XNTuple(XNTuple const& nt) 
-    : mNEnt(0), mNBlk(0), mNSwBlk(0), 
-      mBlkSz(0), mBlk(-1), mOff(0), 
-      mMaxBlk(0), mStrSz(0), 
-      mD(0), mF(0), mI(0), mS(0), 
-      mVarD(NULL), mMin(NULL), mMax(NULL), 
-      mNVars(0), mNames(NULL), 
-      swf(NULL), swf_name(NULL), mInfo(NULL) 
-{
-    if(!glob_swp) SetSwapPath() ; 
-    swp = glob_swp ; 
-    Copy(nt) ; 
-    NbNT++ ; 
-}
-
-
-
-XNTuple::~XNTuple()
-{
-    clean() ; 
-    NbNT-- ; 
-    if(NbNT==0) {delete[] glob_swp ; glob_swp = NULL;} 
-}
-
-
-
-//! Clear the data table definition and deletes the associated data
-void XNTuple::clean()
-{
-    // On libere tous les blocs 
-    for(int i = 0 ; i < mNBlk ; i++) 
-	if(!ptr[i]->sw) delete ptr[i] ; 
-    ptr.erase(ptr.begin(), ptr.end()) ; 
-    sw.erase(sw.begin(), sw.end()) ; 
-    
-    // on ferme le fichier de swap 
-    if(swf) { 
-      fclose(swf) ; swf = NULL ; 
-      remove(swf_name) ; 
-      delete swf_name ; swf_name = NULL ; 
-    }
-    // tout le monde remis a 0 
-    mNEnt   = 0 ;     mNBlk   = 0 ; 
-    mNSwBlk = 0 ;     mBlkSz  = 0 ;  
-    mBlk    = -1 ;    mOff    = 0 ; 
-    mMaxBlk = 0 ;     mStrSz  = 0 ; 
-    mD      = 0 ;     mF      = 0 ; 
-    mI      = 0 ;     mS      = 0 ; 
-    mNVars  = 0 ; 
-    
-    
-    if(mVarD) { delete[] mVarD ; mVarD = NULL ; } 
-    if(mMin)  { delete[] mMin  ; mMin  = NULL ; } 
-    if(mMax)  { delete[] mMax  ; mMax  = NULL ; } 
-
-    if(mNames) {delete[] mNames ; mNames = NULL ; }
-    if (mInfo) delete mInfo;
-
-}
-
-
-//++
-// Titre	Méthodes
-//--
-//++
-//  void Fill(r_8* d_data, r_4* f_data, int* i_data, char** s_data) 
-//	Remplissage d'une ligne dans le NTuple
-//  void Show(ostream& os) const 
-//	Impression de la liste des variables avec min-max sur le flot "os"
-//  void Show() const 
-//	Identique à "Show(cout)"
-//  XNTuple&   operator = (XNTuple const& nt) 
-//	Opérateur égal (=) , copie "nt" dans le premier NTuple
-//--
-//! Appends an entry (line) to the table
-/*!
-  \param d_data : double (r_8) line elements
-  \param f_data : float (r_4) line elements
-  \param i_data : integer (int_4) line elements
-  \param s_data : string line elements
- */
-void XNTuple::Fill(r_8* d_data, r_4* f_data, int_4* i_data, char** s_data) 
-{
-    // place disponible dans bloc courant ? 
-    if( mOff==mBlkSz || mOff==0 ) {
-	add_blk() ; mOff = 0 ; mNBlk++ ; mBlk++ ; 
-    }
-    
-    if( mD && !ptr[mBlk]->ddata || 
-	mF && !ptr[mBlk]->fdata || 
-	mI && !ptr[mBlk]->idata || 
-	mS && !ptr[mBlk]->sdata )
-          throw ParmError("XNTuple::Fill(...) Missing (NULL) argument ");
-    
-    r_8 x ; 
-    // copie variables et update mMin, mMax 
-    if(mD) {
-	memcpy(ptr[mBlk]->ddata+mOff*mD, d_data, mD*sizeof(r_8)) ; 
-	for(int i = 0 ; i < mD ; i++) {
-	    x = d_data[i] ; 
-	    if(x<mMin[i]) mMin[i] = x ; 
-	    if(x>mMax[i]) mMax[i] = x ; 
-	}
-    }
-    
-    if(mF) {
-	memcpy(ptr[mBlk]->fdata+mOff*mF, f_data, mF*sizeof(r_4)) ; 
-	for(int i = 0 ; i < mF ; i++) {
-	    x = f_data[i] ; 
-	    if(x<mMin[i+mD]) mMin[i+mD] = x ; 
-	    if(x>mMax[i+mD]) mMax[i+mD] = x ; 
-	}
-    }
-
-    if(mI) {
-	memcpy(ptr[mBlk]->idata+mOff*mI, i_data, mI*sizeof(int_4)) ; 
-	for(int i = 0 ; i < mI ; i++) {
-	    x = i_data[i] ; 
-	    if(x<mMin[i+mD+mF]) mMin[i+mD+mF] = x ; 
-	    if(x>mMax[i+mD+mF]) mMax[i+mD+mF] = x ; 
-	}
-    }
-    for(int i = 0 ; i < mS ; i++) 
-	memcpy(ptr[mBlk]->sdata+(mOff*mS+i)*(mStrSz+1), 
-	       s_data[i], (strlen(s_data[i])+1)*sizeof(char)) ; 
-    mOff++ ; 
-    mNEnt++ ; 
-}
-
-// 
-// A quel index correspond mon nom ? 
-// 
-int XNTuple::IndexNom(char const* nom) const 
-{
-    int i ; 
-    for(i = 0 ; i < (mD+mF+mI+mS) ; i++)
-	if( !strncmp( mNames+i*(LENNAME+1), nom, LENNAME+1) ) 
-	    return i ; 
-    return -1 ; 
-}
-
-string XNTuple::NomIndex(int k) const 
-{
-    if( k<0 || k>=mNVars ) return "" ; 
-    return mNames + k*(LENNAME+1) ; 
-}
-
-
-// 
-// 
-// 
-r_8 XNTuple::GetDVal(int i, int k) const 
-{
-    if( i<0 || i>=mNEnt || k<0 || k>=mD ) 
-        throw RangeCheckError("XNTuple::GetDVal() Invalid line/column index");
-    
-    // Bloc ? 
-    int blk = (int)(i/mBlkSz) ; 
-    int off = i%mBlkSz ; 
-    
-    // bloc swappe ? 
-    if( ptr[blk]->sw ) { get_blk(blk) ; swap() ; } 
-    return ptr[blk]->ddata[off*mD+k] ; 
-}
-
-// 
-// 
-// 
-r_4 XNTuple::GetFVal(int i, int k) const 
-{
-    if( i<0 || i>=mNEnt || k<mD || k>=(mD+mF) ) 
-        throw RangeCheckError("XNTuple::GetFVal() Invalid line/column index");
-    k -= mD ; 
-    
-    // Bloc ? 
-    int blk = (int)(i/mBlkSz) ; 
-    int off = i%mBlkSz ; 
-    
-    // bloc swappe ? 
-    if( ptr[blk]->sw ) { get_blk(blk) ; swap() ; } 
-    return ptr[blk]->fdata[off*mF+k] ; 
-}
-
-// 
-// 
-// 
-int_4 XNTuple::GetIVal(int i, int k) const 
-{
-    if( i<0 || i>=mNEnt || k<(mD+mF) || k>=(mD+mF+mI) )
-        throw RangeCheckError("XNTuple::GetIVal() Invalid line/column index");
-
-    k -= (mD+mF) ; 
-
-    // Bloc ? 
-    int blk = (int)(i/mBlkSz) ; 
-    int off = i%mBlkSz ; 
-    
-    // bloc swappe ? 
-    if( ptr[blk]->sw ) { get_blk(blk) ; swap() ; } 
-
-    return ptr[blk]->idata[off*mI+k] ; 
-}
-
-// 
-// 
-// 
-string  XNTuple::GetSVal(int i, int k) const 
-{
-    if( i<0 || i>=mNEnt || k<(mD+mF+mI) || k>=(mD+mF+mI+mS) )
-        throw RangeCheckError("XNTuple::GetSVal() Invalid line/column index");
-
-    k -= (mD+mF+mI) ; 
-    
-    // Bloc ? 
-    int blk = (int)(i/mBlkSz) ; 
-    int off = i%mBlkSz ; 
-    
-    // bloc swappe ? 
-    if( ptr[blk]->sw ) { get_blk(blk) ; swap() ; } 
-    
-    // copie de la chaine 
-    // string ret = strdup(ptr[blk]->sdata + (off*mS+k)*(mStrSz+1)) ; // $CHECK$ EA fuite de memoire
-       // attention, strdup fait un malloc et on ne fait jamais de free...
-       // a quoi sert ce strdup ?????????
-    string ret = ptr[blk]->sdata + (off*mS+k)*(mStrSz+1) ; 
-    //    return ptr[blk]->sdata[k] ; 
-    return ret ; 
-}
-
-
-// 
-// Copie bloc a bloc, avec meme parametres 
-//  
-void XNTuple::Copy(XNTuple const& nt) 
-{
-    clean() ; 
-    // Parametres 
-    mNEnt = nt.mNEnt ; 
-    mBlkSz = nt.mBlkSz ; 
-    mOff = nt.mOff ; 
-    mMaxBlk = nt.mMaxBlk ; 
-    mStrSz = nt.mStrSz ; 
-    mD = nt.mD ; 
-    mF = nt.mF ; 
-    mI = nt.mI ; 
-    mS = nt.mS ; 
-    mNVars = nt.mNVars ; 
-    
-    // noms 
-    if(mNVars) {
-	mNames = new char[mNVars*(LENNAME+1)] ; 
-        mVarD = new r_8[mNVars];
-	memcpy(mNames, nt.mNames, mNVars*(LENNAME+1)*sizeof(char)) ; 
-    }
-    // MinMax 
-    if(nt.mMin) { 
-	mMin = new r_8[(mD+mF+mI)] ; 
-	memcpy(mMin, nt.mMin, (mD+mF+mI)*sizeof(r_8)) ; 
-    }
-    if(nt.mMax) { 
-	mMax = new r_8[(mD+mF+mI)] ; 
-	memcpy(mMax, nt.mMax, (mD+mF+mI)*sizeof(r_8)) ; 
-    }
-    
-    //dup blocs 
-    mNBlk = 0 ; 
-    mBlk  = -1 ; 
-    for(int i = 0 ; i < nt.mNBlk ; i++) {
-	add_blk() ; mBlk++ ; mNBlk++ ; 
-	// si nt.ptr[i] swappe, on le relit 
-	if(nt.ptr[i]->sw) nt.read_blk(nt.ptr[i]) ; 
-	if(mD) 
-	    memcpy(ptr[i]->ddata, nt.ptr[i]->ddata, mD*mBlkSz*sizeof(r_8)) ; 
-	if(mF)
-	    memcpy(ptr[i]->fdata, nt.ptr[i]->fdata, mF*mBlkSz*sizeof(r_4)) ; 
-	if(mI)
-	    memcpy(ptr[i]->idata, nt.ptr[i]->idata, mF*mBlkSz*sizeof(int_4)) ; 
-	if(mS)
-	    memcpy(ptr[i]->sdata, nt.ptr[i]->sdata, mS*mBlkSz*sizeof(char)*(mStrSz+1)) ; 
-	if(nt.ptr[i]->sw) nt.ptr[i]->free() ; 
-    }
-
-    // DVList Info block 
-    if(nt.mInfo!=NULL) {mInfo = new DVList; *mInfo = *(nt.mInfo);}
-
-}
-
-//++
-// DVList& Info()
-//	Renvoie une référence sur l'objet DVList Associé
-//--
-
-//! Returns the associated DVList object
-DVList&  XNTuple::Info()
-{
-  if (mInfo == NULL)  mInfo = new DVList;
-  return(*mInfo);
-}
-
-void XNTuple::Print(int num, int nmax) const 
-{
-    printf("XNTuple::Print() : \n") ; 
-    printf("  Entrees = %d, Blocs  = %d, Bloc Size = %d\n", 
-	   mNEnt, mNBlk, mBlkSz) ; 
-    int i,j;
-    printf("  D_Vars  = %d : ", mD) ; 
-    for(i = 0 ; i < mD ; i++) 
-	printf("%s ", NomIndex(i).c_str() ) ; 
-    printf("\n") ; 
-    
-    printf("  F_Vars  = %d : ", mF) ; 
-    for(i = 0 ; i < mF ; i++) 
-	printf("%s ", NomIndex(i+mD).c_str() ) ; 
-    printf("\n") ; 
-    
-    printf("  I_Vars  = %d : ", mI) ; 
-    for(i = 0 ; i < mI ; i++) 
-	printf("%s ", NomIndex(i+mD+mF).c_str() ) ; 
-    printf("\n") ; 
-    
-    printf("  S_Vars  = %d : ", mS) ; 
-    for(i = 0 ; i < mS ; i++) 
-	printf("%s ", NomIndex(i+mD+mF+mI).c_str() ) ; 
-    printf("\n") ; 
-    
-    for(i = num ; i < num+nmax ; i++) {
-	for(j = 0 ; j < mD ; j++) printf("%f ", GetDVal(i,j)) ; 
-	printf(" -- ") ; 
-	for(j = 0 ; j < mF ; j++) printf("%f ", GetFVal(i,j+mD)) ; 
-	printf(" -- ") ; 
-	for(j = 0 ; j < mI ; j++) printf("%d ", GetIVal(i,j+mD+mF)) ; 
-	printf(" -- ") ; 
-	for(j = 0 ; j < mS ; j++) printf("%s ", GetSVal(i,j+mD+mF+mI).c_str()) ; 
-	printf("\n") ; 
-    }
-}
-
-
-//! Prints table definition and number of entries 
-void   XNTuple::Show(ostream& os) const 
-{
-    os << "XNTuple: NVar= " << mNVars << " NEnt= " << mNEnt 
-       << " (BlkSz,NBlk= " << mBlkSz << ", " << mNBlk << ")" 
-       << " (mNSwBlk= " << mNSwBlk << ")" << endl ; 
-    os << "(Sw File= " ; if(swf_name) os << swf_name ; os << ")" << endl ; 
-    
-    char* buff = new char[80] ; 
-    sprintf(buff, "Variables   :  Type         Min         Max  \n") ; 
-    os << buff ; 
-    
-    r_8 min, max ;
-    int i; 
-    for(i = 0 ; i < mD ; i++) {
-	GetMinMax(i, min, max) ; 
-	sprintf(buff, "  %-10s:   D    %12.6g   %12.6g \n", 
-		NomIndex(i).c_str(), min, max) ; 
-	os << buff ; 
-    }
-    for(i = 0 ; i < mF ; i++) {
-	GetMinMax(i+mD, min, max) ; 
-	sprintf(buff, "  %-10s:   F    %12.6g   %12.6g \n", 
-		NomIndex(i+mD).c_str(), min, max) ; 
-	os << buff ; 
-    }
-    for(i = 0 ; i < mI ; i++) {
-	GetMinMax(i+mD+mF, min, max) ; 
-	sprintf(buff, "  %-10s:   I    %12.6g   %12.6g \n", 
-		NomIndex(i+mD+mF).c_str(), min, max) ; 
-	os << buff ; 
-    }
-    for(i = 0 ; i < mS ; i++) {
-	sprintf(buff, "  %-10s:   S      -----        ----- \n", 
-		NomIndex(i+mD+mF+mI).c_str()) ; 
-	os << buff ; 
-    }
-    delete[] buff ; 
-}
-
-//! NOT YET IMPLEMENTED ! - Fills table from an ascii file
-int    XNTuple::FillFromASCIIFile(string const& fn, r_8 ddval,  r_4 dfval,
-                                        int dival, const char * dsval)
-//	Remplit le ntuple a partir d'un fichier ASCII.
-//	Renvoie le nombre de lignes ajoutees.
-{
-// a faire
-return(0);
-}
-
-
-//! Defines swap file path for XNTuple objects (Default=$TMPDIR or /tmp/)
-void  XNTuple::SetSwapPath(char* p) 
-{
-    if (p == NULL) {
-      p = getenv("TMPDIR");
-      if (p == NULL) p = "/tmp/";
-    }
-    if(!glob_swp) glob_swp = new char[MAXLEN+2] ; 
-    strncpy(glob_swp,p,MAXLEN);
-    if(glob_swp[strlen(glob_swp)] != '/') strcat(glob_swp,"/");
-}
-
-// 
-// 
-// Interface NTuple 
-// 
-// 
-sa_size_t XNTuple::NbLines() const
-{
-    return(NEntry());
-}
-
-sa_size_t XNTuple::NbColumns() const
-{
-    return(NVar());
-}
-
-r_8* XNTuple::GetLineD(sa_size_t n) const 
-{
-    // memcpy() impossible
-    // il faut faire des GetVal 
-    int i;
-    for(i = 0 ; i < mD ; i++) 
-	mVarD[i] = GetDVal(n, i) ; 
-    for(i = 0 ; i < mF ; i++) 
-	mVarD[i+mD] = (r_8)GetFVal(n, i+mD) ; 
-    for(i = 0 ; i < mI ; i++) 
-	mVarD[i+mD+mF] = (r_8)GetIVal(n, i+mD+mF) ; 
-    for(i = 0 ; i < mS ; i++) 
-	mVarD[i+mD+mF+mI] = atof(GetSVal(n, i+mD+mF+mI).c_str()) ; 
-    return mVarD ; 
-}
-
-
-r_8  XNTuple::GetCell(sa_size_t n, sa_size_t k) const 
-{
-    if( k<0 || k>=(mD+mF+mI+mS) ) return BADVAL ; 
-    if(k<mD) return GetDVal(n,k) ; 
-    if(k<(mF+mD)) return GetFVal(n,k) ; 
-    if(k<(mF+mD+mI)) return GetIVal(n,k) ; 
-    if(k<(mD+mF+mI+mS)) return atof(GetSVal(n,k).c_str()) ; 
-    return BADVAL ; 
-}
-
-
-r_8  XNTuple::GetCell(sa_size_t n, string const& nom) const 
-{
-    int k = IndexNom(nom.c_str()) ; 
-    if(k<0) return BADVAL ; 
-    if(k<mD) return GetDVal(n,k) ; 
-    if(k<(mF+mD)) return GetFVal(n,k) ; 
-    if(k<(mF+mD+mI)) return GetIVal(n,k) ; 
-    if(k<(mD+mF+mI+mS)) return atof(GetSVal(n,k).c_str()) ; 
-    return BADVAL ; 
-}
-
-string   XNTuple::GetCelltoString(sa_size_t n, sa_size_t k) const
-{
-    char buff[32];
-    if(k<0) return (""); 
-    else if(k<mD) 
-      { sprintf(buff, "%g", GetDVal(n,k)); return(buff) ; } 
-    else if(k<(mF+mD)) 
-      { sprintf(buff, "%g", (double)GetFVal(n,k)); return(buff) ; } 
-    else if(k<(mF+mD+mI)) 
-      { sprintf(buff, "%d", GetIVal(n,k)); return(buff) ; } 
-    else if(k<(mD+mF+mI+mS)) 
-      return(GetSVal(n,k).c_str()) ; 
-    return("");
-}
-
-void XNTuple::GetMinMax(sa_size_t k, double& min, double& max)  const
-{
-    min = 9E19 ; max = -9E19 ; 
-    // variables string non traitees 
-    if( k<0 || k>=(mD+mF+mI) ) return ; 
-    
-    min = mMin[k] ; 
-    max = mMax[k] ; 
-    return ; 
-}
-
-
-void XNTuple::GetMinMax(string const & nom, double& min, double& max)   const
-{
-    GetMinMax(IndexNom(nom.c_str()), min, max) ; 
-}
-
-
-sa_size_t XNTuple::ColumnIndex(string const& nom) const 
-{
-    return IndexNom(nom.c_str()) ; 
-}
-
-
-string XNTuple::ColumnName(sa_size_t k) const 
-{
-    return NomIndex(k) ; 
-}
-
-
-string XNTuple::VarList_C(const char* nomx) const 
-{
-    string rets = "" ; 
-    rets += "/* r_8 type variables */ \n";
-    // variables r_8 
-    int i;
-    for(i = 0 ; i < mD ; i++) {
-	if( i>0 && (i%5)==0 ) rets += ";" ; 
-	if( (i%5)==0 ) rets+="\ndouble " ; 
-	else rets += ", " ; 
-	rets += NomIndex(i) ; 
-    }
-    if(mD) rets += ";" ; 
-    
-    // variables r_4 
-    rets += "/* r_4 type variables */ \n";
-    for(i = 0 ; i < mF ; i++) {
-	if( i>0 && (i%5)==0 ) rets += ";" ; 
-	if( (i%5)==0 ) rets+="\ndouble " ; 
-	else rets += ", " ; 
-	rets += NomIndex(i+mD) ; 
-    }
-    if(mF) rets += ";" ; 
-    
-    // variables int 
-    rets += "/* int type variables */ \n";
-    for(i = 0 ; i < mI ; i++) {
-	if( i>0 && (i%5)==0 ) rets += ";" ; 
-	if( (i%5)==0 ) rets+="\ndouble " ; 
-	else rets += ", " ; 
-	rets += NomIndex(i+mD+mF) ; 
-    }
-    if(mI) rets += ";" ; 
-    
-    // variables string
-    rets += "/* string type variables */ \n"; 
-    for(i = 0 ; i < mS ; i++) {
-	if( i>0 && (i%5)==0 ) rets += ";" ; 
-	if( (i%5)==0 ) rets+="\ndouble " ; 
-	else rets += ", " ; 
-	rets += NomIndex(i+mD+mF+mI) ; 
-    }
-    if(mS) rets += "; \n" ; 
-
-    if(nomx) {
-	char buff[256] ; 
-	for(i = 0 ; i < mNVars ; i++) {
-	    sprintf(buff, "%s=%s[%d]; ", NomIndex(i).c_str(), nomx, i) ; 
-	    rets+=buff ; 
-	    if( (i%3 == 0) && (i>0) ) rets += "\n" ; 
-	}
-    }
-    return rets ; 
-}
-
-
-string XNTuple::LineHeaderToString() const 
-{
-    char buff[32];
-    string rets=" Num    ";
-    for(int i=0; i<mNVars; i++) {
-	sprintf(buff, "%8s ", NomIndex(i).c_str() );
-	rets += buff;
-    }
-    rets += '\n';
-    return(rets);
-
-}
-
-
-string XNTuple::LineToString(sa_size_t n) const 
-{
-    char buff[32];
-    r_8* val;
-    val = GetLineD(n);
-    sprintf(buff,"%6d: ",n); 
-    string rets=buff;
-    int i;
-    for(i=0; i<(mD+mF+mI); i++) {
-	sprintf(buff, "%8.3g ", val[i]);
-	rets += buff;
-    }
-    
-    for(i = mD+mF+mI ; i < mNVars ; i++) {
-	sprintf(buff, "%8s ", GetSVal(n,i).c_str() ) ; 
-	rets += buff ; 
-    }
-    
-    rets += '\n';
-    return(rets);
-}
-
-/*!
-   \class ObjFileIO<XNTuple>
-   \ingroup HiStats
-   Persistence (serialisation) handler for class XNTuple
-*/
-
-DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
-void   ObjFileIO<XNTuple>::WriteSelf(POutPersist& ppout) const 
-{
-  if (dobj == NULL)   return;
-//  On ecrit 3 uint_4 .... 
-//  0: Numero de version,  1 : non nul -> has info,  2 : reserve
-  uint_4 itab[3];
-  itab[0] = 1;  // Numero de version a 1
-  itab[1] = itab[2] = 0;
-  if (dobj->mInfo)  itab[1] = 1;
-  ppout.Put(itab,3);
-  if (dobj->mInfo)  if (dobj->mInfo)  ppout << (*(dobj->mInfo));
-
-  // variables internes 
-  ppout.PutI4(dobj->mNEnt) ; 
-  ppout.PutI4(dobj->mNBlk) ; 
-  ppout.PutI4(dobj->mBlkSz) ; 
-  ppout.PutI4(dobj->mBlk) ; 
-  ppout.PutI4(dobj->mOff) ; 
-  ppout.PutI4(dobj->mMaxBlk) ; 
-  ppout.PutI4(dobj->mStrSz) ; 
-  ppout.PutI4(dobj->mD) ; 
-  ppout.PutI4(dobj->mF) ; 
-  ppout.PutI4(dobj->mI) ; 
-  ppout.PutI4(dobj->mS) ; 
-  ppout.PutI4(dobj->mNVars) ; 
-    
-  // Noms 
-  ppout.PutBytes(dobj->mNames, dobj->mNVars*(LENNAME+1)) ; 
-
-  // MinMax 
-  ppout.PutR8s(dobj->mMin, (dobj->mD+dobj->mF+dobj->mI)) ; 
-  ppout.PutR8s(dobj->mMax, (dobj->mD+dobj->mF+dobj->mI)) ; 
-    
-  // Ecriture blocs N'ecrire que si datas existent 
-  for(int i = 0 ; i < dobj->mNBlk ; i++) {
-    // si bloc swappe, on le relit en douce ... 
-    if( dobj->ptr[i]->sw )  dobj->read_blk(dobj->ptr[i]) ; 
-    ppout.PutR8s(dobj->ptr[i]->ddata, dobj->mD*dobj->mBlkSz) ; 
-    ppout.PutR4s(dobj->ptr[i]->fdata, dobj->mF*dobj->mBlkSz) ; 
-    ppout.PutI4s(dobj->ptr[i]->idata, dobj->mI*dobj->mBlkSz) ; 
-    ppout.PutBytes(dobj->ptr[i]->sdata, dobj->mS*dobj->mBlkSz*(dobj->mStrSz+1)) ; 
-    if(dobj->ptr[i]->sw) dobj->ptr[i]->free() ; 
-    }
-}
-
-
-DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
-void   ObjFileIO<XNTuple>::ReadSelf(PInPersist& ppin) 
-{
-  if (dobj == NULL) dobj = new XNTuple;
-  else    dobj->clean() ; 
-//  On lit 3 uint_4 .... 
-//  0: Numero de version,  1 : non nul -> has info,  2 : reserve
-  uint_4 itab[3];
-  ppin.Get(itab,3);
-  if (itab[1] != 0) { // Lecture eventuelle du DVList Info
-    if (dobj->mInfo == NULL)  dobj->mInfo = new DVList;
-    ppin >> (*(dobj->mInfo));
-  }
-
-  ppin.GetI4(dobj->mNEnt) ; 
-  ppin.GetI4(dobj->mNBlk) ; 
-  ppin.GetI4(dobj->mBlkSz) ; 
-  ppin.GetI4(dobj->mBlk) ; 
-  ppin.GetI4(dobj->mOff) ; 
-  ppin.GetI4(dobj->mMaxBlk) ; 
-  ppin.GetI4(dobj->mStrSz) ; 
-  ppin.GetI4(dobj->mD) ; 
-  ppin.GetI4(dobj->mF) ; 
-  ppin.GetI4(dobj->mI) ; 
-  ppin.GetI4(dobj->mS) ; 
-  ppin.GetI4(dobj->mNVars) ; 
-    
-  // Noms 
-  dobj->mNames = new char[dobj->mNVars*(LENNAME+1)] ;
-  dobj->mVarD = new r_8[dobj->mNVars]; 
-  ppin.GetBytes(dobj->mNames, dobj->mNVars*(LENNAME+1)) ; 
-
-  // MinMax 
-  dobj->mMin = new r_8[dobj->mD+dobj->mF+dobj->mI] ; 
-  ppin.GetR8s(dobj->mMin, dobj->mD+dobj->mF+dobj->mI) ; 
-  dobj->mMax = new r_8[dobj->mD+dobj->mF+dobj->mI] ; 
-  ppin.GetR8s(dobj->mMax, dobj->mD+dobj->mF+dobj->mI) ; 
-    
-  // lecture Blocs 
-  int nblk = dobj->mNBlk ; 
-  dobj->mBlk = -1 ; dobj->mNBlk = 0 ; 
-  for(int i = 0 ; i < nblk ; i++) {
-    dobj->add_blk() ; dobj->mBlk++ ; dobj->mNBlk++ ; 
-    ppin.GetR8s(dobj->ptr[i]->ddata, dobj->mD*dobj->mBlkSz) ; 
-    ppin.GetR4s(dobj->ptr[i]->fdata, dobj->mF*dobj->mBlkSz) ; 
-    ppin.GetI4s(dobj->ptr[i]->idata, dobj->mI*dobj->mBlkSz) ; 
-    ppin.GetBytes(dobj->ptr[i]->sdata, dobj->mS*dobj->mBlkSz*(dobj->mStrSz+1)) ; 
-  } 
-}
-
-
-
-
-
-#ifdef __CXX_PRAGMA_TEMPLATES__
-#pragma define_template ObjFileIO<XNTuple>
-#endif
-
-#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
-template class ObjFileIO<XNTuple>;
-#endif
-
-} // FIN namespace SOPHYA 
Index: trunk/SophyaLib/HiStats/xntuple.h
===================================================================
--- trunk/SophyaLib/HiStats/xntuple.h	(revision 3567)
+++ 	(revision )
@@ -1,179 +1,0 @@
-// -*- C++ -*- 
-// 
-// XNTuple 
-// 
-// N. Regnault 03/98 
-//             07/99 (NTupleInterface)
-// 
-// 
-#ifndef XNTUPLE_H_SEEN
-#define XNTUPLE_H_SEEN
-
-#include "machdefs.h"
-
-#include <string.h>
-#include <vector>
-#include <list>
-#include <map>
-
-#include "ntupintf.h"
-#include "ppersist.h"
-#include "dvlist.h"
-#include "objfio.h"
-
-
-namespace SOPHYA {
-// 
-// Bloc de donnees 
-// 
-//! \cond  Pour ne pas inclure dans la documentation
-struct NTBlk
-{
-    NTBlk(int ndvar, int nfvar, int nivar, int nsvar, int strsz, int sz) ; 
-    ~NTBlk() ; 
-    
-    void free() ;     // ne libere que les zones de donnees 
-
-    int      sw ;     // swappe ? 
-    long int swoff ;  // offset dans fichier de swap 
-    r_4*     fdata ;  
-    r_8*     ddata ;  
-    int_4*   idata ;  
-    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:
-  //    enum {classId = ClassId_XNTuple };
-
-    XNTuple() ; 
-    XNTuple(int ndvar, int nfvar, int nivar, int nsvar, 
-	    char** vnames, 
-	    int blk=512, int maxblk=100, int strsz=30) ; 
-    XNTuple(XNTuple const& nt) ; 
-    XNTuple(string const & flnm); 
-    virtual           ~XNTuple();
-    
-    void              Fill(r_8* d_data, r_4* f_data, int_4* i_data, char** sdata);
-    
-    inline int_4      NEntry() const { return mNEnt ; } 
-    inline int_4      NDVar() const  { return mD ; } 
-    inline int_4      NFVar() const  { return mF ; } 
-    inline int_4      NIVar() const  { return mI ; } 
-    inline int_4      NSVar() const  { return mS ; } 
-    inline int_4      NVar() const   { return mNVars ; } 
-    int               IndexNom(char const* nom) const ; 
-    string            NomIndex(int k) const ; 
-    
-    r_8               GetDVal(int i, int k) const ; 
-    r_4               GetFVal(int i, int k) const ; 
-    int_4             GetIVal(int i, int k) const ; 
-    string            GetSVal(int i, int k) const ; 
-    //    MuTyV             GetVal(char const* nom) ; 
-    
-    void              Copy(XNTuple const& nt) ; 
-    inline XNTuple&   operator=(XNTuple const& nt) { Copy(nt) ; return *this ; } 
-    
-    void              Print(int num, int nmax=1) const ;
-    void              Show(ostream& os) const ; 
-    inline void       Show() const { Show(cout) ; } 
-
-    DVList&           Info() ; 
-
-// Remplissage depuis fichier ASCII 
-   int		      FillFromASCIIFile(string const& fn, r_8 ddfval=0., r_4 dfval=0.,
-                                        int dival=0, const char * dsval="");
-        
-    static  void      SetSwapPath(char* p=NULL) ; 
-    string&           SwapPath() { return swp ; } 
-    
-// Declaration de l interface NTuple
-    virtual sa_size_t NbLines() const ;
-    virtual sa_size_t NbColumns() const ;
-    virtual r_8 *     GetLineD(sa_size_t n) const ;
-    virtual r_8	      GetCell(sa_size_t n, sa_size_t k) const ;
-    virtual r_8	      GetCell(sa_size_t n, string const & nom) const ;
-    virtual string    GetCelltoString(sa_size_t n, sa_size_t k) const ;
-    virtual void      GetMinMax(sa_size_t k, double& min, double& max)   const ; 
-    virtual void      GetMinMax(string const & nom, double& min, double& max)   const ; 
-    virtual sa_size_t ColumnIndex(string const & nom)  const ;
-    virtual string    ColumnName(sa_size_t k) const;
-    virtual string    VarList_C(const char* nomx=NULL) const ;
-    virtual string    LineHeaderToString() const;
-    virtual string    LineToString(sa_size_t n) const;  
-
-//  Pour la gestion de persistance
-    friend class ObjFileIO<XNTuple> ;
-
-
-  // pour fichiers FITS
-    friend class FITS_XNTuple;
-
-
-private:
-
-
-
-    void    clean();    // remet tout a zero 
-    void    swap() const ;    // swappe le + ancien blk en memoire 
-    void    read_blk(NTBlk*) const ;  // relit le bloc 
-    void    write_blk(NTBlk*) const ; // ecrit un bloc 
-    void    get_blk(int i) const ;  // == unswap() 
-    void    add_blk() ; // ajout d'un nouveau bloc 
-    
-    int_4   mNEnt ;   // nb total d'entrees 
-    int_4   mNBlk ;   // nb total de blocs 
-    mutable int_4   mNSwBlk ; // nb blocs swappes 
-    int_4   mBlkSz ;  // taille bloc 
-    int_4   mBlk ;    // bloc courant en ecriture 
-    int_4   mOff ;    // offset dans bloc en ecriture ; pointe sur le premiere case vide 
-    int_4   mMaxBlk ; // nb max de blocs autorises en memoire 
-    int_4   mStrSz ;  // taille des variables char** 
-    int_4   mNVars ;  // mD + mF + mI + mS 
-    int_4   mD, mF, mI, mS ; // nb variables de chaque type 
-    
-    r_8* mVarD, *mMin, *mMax ; 
-    
-    // 
-    // Noms + Prefix --> indiquer le type 
-    // 
-    //    char* mDNames, *mFNames, *mINames, *mSNames ; 
-    char* mNames ; 
-    //    typedef less<string> SCmp ; 
-    //    map<string,int,SCmp> mNames ; 
-    
-    // Donnees 
-    mutable vector<NTBlk*> ptr ; 
-    mutable list<NTBlk*> sw ; // liste --> swap() 
-
-    mutable FILE* swf ; // fichier --> swap 
-    mutable char* swf_name ; 
-    string  swp ; // swap_path 
-
-    DVList* mInfo;        // Infos (variables) attachees au NTuple
-
-    static  char*  glob_swp ; // swap_path global 
-    static  long int NbNT ; 
-}; 
-
-/*! Prints table information on stream \b s (nt.Show(os)) */
-inline ostream& operator << (ostream& s, XNTuple const & nt)
-  {  nt.Show(s);  return(s);  }
-
-/*! Writes the object in the POutPersist stream \b os */
-inline POutPersist& operator << (POutPersist& os, XNTuple & obj)
-{ ObjFileIO<XNTuple> fio(&obj);  fio.Write(os);  return(os); }
-/*! Reads the object from the PInPersist stream \b is */
-inline PInPersist& operator >> (PInPersist& is, XNTuple & obj)
-{ ObjFileIO<XNTuple> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
-
-// Classe pour la gestion de persistance
-// ObjFileIO<XNTuple>
-} // namespace SOPHYA
-
-#endif
-
Index: trunk/SophyaLib/NTools/Makefile
===================================================================
--- trunk/SophyaLib/NTools/Makefile	(revision 3567)
+++ trunk/SophyaLib/NTools/Makefile	(revision 3572)
@@ -4,8 +4,8 @@
  
 clean:
-	 rm -f $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)imageop.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o
+	 rm -f $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)imageop.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)slinparbuff.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o
 	rm -f $(SOPHYALIBP)libNTools.a
  
-$(SOPHYALIBP)libNTools.a : $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o
+$(SOPHYALIBP)libNTools.a : $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)slinparbuff.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
@@ -39,5 +39,6 @@
   $(SOPHYAINCP)matharr.h \
   $(SOPHYAINCP)fioarr.h \
-  $(SOPHYAINCP)sopemtx.h fftservintf.h \
+  $(SOPHYAINCP)sopemtx.h \
+  $(SOPHYAINCP)arrctcast.h fftservintf.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)tmatrix.h \
@@ -640,4 +641,10 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  simplex.cc
  
+$(SOPHYAOBJP)slinparbuff.o: slinparbuff.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)machdefs.h slinparbuff.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  slinparbuff.cc
+ 
 $(SOPHYAOBJP)tabmath.o: tabmath.cc $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h tabmath.h peida.h \
@@ -677,5 +684,6 @@
   $(SOPHYAINCP)matharr.h \
   $(SOPHYAINCP)fioarr.h \
-  $(SOPHYAINCP)sopemtx.h fftservintf.h \
+  $(SOPHYAINCP)sopemtx.h \
+  $(SOPHYAINCP)arrctcast.h fftservintf.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)tmatrix.h \
Index: trunk/SophyaLib/NTools/datatypes.cc
===================================================================
--- trunk/SophyaLib/NTools/datatypes.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/datatypes.cc	(revision 3572)
@@ -9,5 +9,5 @@
 
 /* Nouvelle-Fonction */
-char * DataName(PBaseDataTypes typ)
+const char * DataName(PBaseDataTypes typ)
 {
 switch (typ)
@@ -33,5 +33,5 @@
 
 /* Nouvelle-Fonction */
-char * DataLongName(PBaseDataTypes typ)
+const char * DataLongName(PBaseDataTypes typ)
 {
 switch (typ)
Index: trunk/SophyaLib/NTools/datatypes.h
===================================================================
--- trunk/SophyaLib/NTools/datatypes.h	(revision 3567)
+++ trunk/SophyaLib/NTools/datatypes.h	(revision 3572)
@@ -23,6 +23,6 @@
 inline PBaseDataTypes DataType(r_8)    {return kr_8;}
 
-char * DataName(PBaseDataTypes);
-char * DataLongName(PBaseDataTypes);
+const char * DataName(PBaseDataTypes);
+const char * DataLongName(PBaseDataTypes);
 int    DataSize(PBaseDataTypes);
 
Index: trunk/SophyaLib/NTools/dates.cc
===================================================================
--- trunk/SophyaLib/NTools/dates.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/dates.cc	(revision 3572)
@@ -39,5 +39,5 @@
 TimeZone::TimeZone()
 {
-  char* p = getenv("ACQ_TZ");
+  const char* p = getenv("ACQ_TZ");
 #if defined(__DECCXX) || defined(__KCC__) || defined(__aCC__)
   if (!p) p = const_cast<char *>("France");
Index: trunk/SophyaLib/NTools/functab.cc
===================================================================
--- trunk/SophyaLib/NTools/functab.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/functab.cc	(revision 3572)
@@ -53,8 +53,8 @@
   Dx = (r_8)(XMax-XMin)/(r_8)(NTab-1);
   Tabul = new r_8[NTab+2];
-  for(int_4 i=0;i<NTab+2;i++) Tabul[i] = 0.;
+  for(uint_4 i=0;i<NTab+2;i++) Tabul[i] = 0.;
   PInterpL = PInterpP[0] = PInterpP[1] = NULL;
   if(!Tabul) return;
-  for(int_4 i=0;i<NTab;i++) Tabul[i+1] = func(XMin + i*Dx);
+  for(uint_4 i=0;i<NTab;i++) Tabul[i+1] = func(XMin + i*Dx);
   Tabul[0] = Tabul[1];
   Tabul[NTab+1] = Tabul[NTab];
@@ -106,5 +106,5 @@
     if(PInterpL) delete [] PInterpL;
     PInterpL = new r_8[NTab+2];
-    for(int_4 i=0;i<NTab+1;i++)
+    for(uint_4 i=0;i<NTab+1;i++)
       PInterpL[i] = (Tabul[i+1]-Tabul[i])/Dx;
     PInterpL[NTab+1] = 0.;
@@ -116,5 +116,5 @@
     PInterpP[0] = new r_8[NTab+2];
     PInterpP[1] = new r_8[NTab+2];
-    for(int_4 i=1;i<=NTab;i++) {
+    for(uint_4 i=1;i<=NTab;i++) {
       PInterpP[0][i] = (Tabul[i+1]+Tabul[i-1]-2.*Tabul[i])/(2.*Dx*Dx);
       PInterpP[1][i] = (Tabul[i+1]-Tabul[i-1])/(2.*Dx);
Index: trunk/SophyaLib/NTools/generalfit.cc
===================================================================
--- trunk/SophyaLib/NTools/generalfit.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/generalfit.cc	(revision 3572)
@@ -279,5 +279,5 @@
   Pour ecrire les iterations dans le fichier filename
 */
-void GeneralFit::WriteStep(char *filename)
+void GeneralFit::WriteStep(const char *filename)
 {
 
Index: trunk/SophyaLib/NTools/generalfit.h
===================================================================
--- trunk/SophyaLib/NTools/generalfit.h	(revision 3567)
+++ trunk/SophyaLib/NTools/generalfit.h	(revision 3572)
@@ -53,5 +53,5 @@
   ~GeneralFit();
 
-  void            WriteStep(char *filename = NULL);
+  void            WriteStep(const char *filename = NULL);
   void            SetDebug(int level = 0);
   void            SetMaxStep(int n = 100);
Index: trunk/SophyaLib/NTools/ntools.h
===================================================================
--- trunk/SophyaLib/NTools/ntools.h	(revision 3567)
+++ trunk/SophyaLib/NTools/ntools.h	(revision 3572)
@@ -15,4 +15,5 @@
 #include "poly.h"
 #include "datatypes.h"
+#include "slinparbuff.h"
 
 #include "cimage.h"
Index: trunk/SophyaLib/NTools/objlist.list
===================================================================
--- trunk/SophyaLib/NTools/objlist.list	(revision 3567)
+++ trunk/SophyaLib/NTools/objlist.list	(revision 3572)
@@ -31,4 +31,5 @@
 simplesort.o
 simplex.o
+slinparbuff.o
 tabmath.o
 toeplitzMatrix.o
Index: trunk/SophyaLib/NTools/pclassids.h
===================================================================
--- trunk/SophyaLib/NTools/pclassids.h	(revision 3567)
+++ trunk/SophyaLib/NTools/pclassids.h	(revision 3572)
@@ -30,5 +30,4 @@
    ClassId_HistoErr = 0x0204,
    ClassId_NTuple   = 0x0210,
-   ClassId_XNTuple  = 0x0211,
 
    ClassId_GeneralFitData  = 0x0290,
Index: trunk/SophyaLib/NTools/poly.cc
===================================================================
--- trunk/SophyaLib/NTools/poly.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/poly.cc	(revision 3572)
@@ -710,5 +710,5 @@
 Poly2& Poly2::operator *= (double a)
 {
-  for (uint_4 i=0; i<NElts(); i++) Element(i) *= a;
+  for (int_4 i=0; i<NElts(); i++) Element(i) *= a;
   return *this;
 }
Index: trunk/SophyaLib/NTools/simplex.cc
===================================================================
--- trunk/SophyaLib/NTools/simplex.cc	(revision 3567)
+++ trunk/SophyaLib/NTools/simplex.cc	(revision 3572)
@@ -366,5 +366,5 @@
   int ilo, ihi, inhi;
   int move = 0;
-  char* smov[6] = { "None", "Reflection", "ReflecExpand", "ContractHigh", "ContractLow", "ExpandHigh" };
+  const char* smov[6] = { "None", "Reflection", "ReflecExpand", "ContractHigh", "ContractLow", "ExpandHigh" };
   int movcnt[6] = {0,0,0,0,0,0};
 
@@ -511,5 +511,5 @@
 int MinZSimplex::StopReason(string& s)
 {
-  char* sr[5] = { "NoConverg, MaxIterReached", "OK, fm<Tol0", "OK, Df/f<Tol1", 
+  const char* sr[5] = { "NoConverg, MaxIterReached", "OK, fm<Tol0", "OK, Df/f<Tol1", 
 		  "OK, [Df/f max]Iter<Tol2" "Error - Wrong StopReason" };
   int stop = mStop;
Index: trunk/SophyaLib/NTools/slinparbuff.h
===================================================================
--- trunk/SophyaLib/NTools/slinparbuff.h	(revision 3567)
+++ trunk/SophyaLib/NTools/slinparbuff.h	(revision 3572)
@@ -1,8 +1,2 @@
-#include "machdefs.h"
-#include <iostream>
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <algorithm>
 #include "pexceptions.h"
 
@@ -17,307 +11,29 @@
   friend class SLinParBuffMerger;
 
-  //***************************************************************** 
-  SLinParBuff(uint_4 lenbuf,uint_4 nresynch=0
-             ,r_8 x0=0.,r_8 y0=0.,bool autoxy0=false)
-  // ---- Createur
-  {
-    if(lenbuf==0) throw RangeCheckError("SLinParBuff: lenbuf==0 !");
-    mLenBuf = lenbuf;
-    mNResynch = nresynch;
-    mX = new r_8[mLenBuf]; mY = new r_8[mLenBuf];
-    mX0 = x0; mY0 = y0; mAutoXY0 = autoxy0;
-    Reset();
-  }
+  SLinParBuff(uint_4 lenbuf,uint_4 nresynch=0,r_8 x0=0.,r_8 y0=0.,bool autoxy0=false);
+  SLinParBuff(SLinParBuff& slp);
+  SLinParBuff(void);
+  virtual ~SLinParBuff();
 
-  SLinParBuff(SLinParBuff& slp)
-  // ---- Createur par copie
-  {
-    mLenBuf = slp.mLenBuf;
-    mNResynch = slp.mNResynch;
+  void GetX0Y0(r_8& x0,r_8& y0);
+  bool GetAutoX0Y0();
+  void SetX0Y0(r_8 x0=0.,r_8 y0=0.);
+  void SetAutoX0Y0(bool autoxy0=false);
 
-    mX = mY = NULL;
-    if(mLenBuf) {
-      mX = new r_8[mLenBuf]; mY = new r_8[mLenBuf];
-      for(uint_4 i=0;i<mLenBuf;i++) {mX[i]=slp.mX[i]; mY[i]=slp.mY[i];}
-    }
-
-    mX0 = slp.mX0; mY0 = slp.mY0; mAutoXY0 = slp.mAutoXY0;
-    mNCur = slp.mNCur; mIDeb = slp.mIDeb; mIResynch = slp.mIResynch;
-    mNResynchEff = slp.mNResynchEff; mNPush = slp.mNPush; mNPop = slp.mNPop;
-
-    mSx = slp.mSx; mSy = slp.mSy;
-    mSx2 = slp.mSx2; mSy2 = slp.mSy2; mSxy = slp.mSxy;
-    mSx3 = slp.mSx3; mSx2y = slp.mSx2y;
-    mSx4 = slp.mSx4;
-  }
-
-  SLinParBuff(void)
-  // ---- Createur par defaut
-  {
-    mLenBuf = 0; mNResynch = 0;
-    mX = mY = NULL;
-    mX0 = mY0 = 0.; mAutoXY0 = false;
-    Reset();
-  }
-
-  virtual ~SLinParBuff()
-  // ---- Destructeur
-  {
-    if(mX) delete [] mX; if(mY) delete [] mY;
-  }
-
-  //***************************************************************** 
-  inline void GetX0Y0(r_8& x0,r_8& y0) {x0 = mX0; y0 = mY0;}
-  inline bool GetAutoX0Y0() {return mAutoXY0;}
-
-  inline void SetX0Y0(r_8 x0=0.,r_8 y0=0.)
-  // ---- Stabilite numerique, centrage des x,y en mX0,mY0
-  {
-    mX0 = x0; mY0 = y0; mAutoXY0 = false;
-    ReComputeSum();
-  }
-
-  inline void SetAutoX0Y0(bool autoxy0=false)
-  // ---- Stabilite numerique, centrage automatique a <x> et <y>
-  //      a chaque ReComputeSum
-  {
-    mAutoXY0 = autoxy0;
-    ReComputeSum();
-  }
-
-  inline void Reset(void)
-  // ---- Reset des sommes et des compteurs
-  {
-    mSx=mSy=mSx2=mSy2=mSxy=mSx3=mSx2y=mSx4=0.;
-    mNCur = mIDeb = mIResynch = mNResynchEff = mNPush = mNPop = 0;
-    //if(mX) for(uint_4 i=0;i<mLenBuf;i++) mX[i] = 0.;
-    //if(mY) for(uint_4 i=0;i<mLenBuf;i++) mY[i] = 0.;
-  }
-
-  //***************************************************************** 
-  inline uint_4 Pop(void)
-  // ---- Pour enlever la donnee la plus ancienne
-  {
-    if(mNCur==0) return mNCur;
-    r_8 x=mX[mIDeb]-mX0, y=mY[mIDeb]-mY0; r_8 x2 = x*x;
-    mSx  -= x;     mSy   -= y;
-    mSx2 -= x2;    mSy2  -= y*y;   mSxy -= x*y;
-    mSx3 -= x2*x;  mSx2y -= x2*y;
-    mSx4 -= x2*x2;
-    mNCur--; mNPop++;
-    if(mNCur==0) {Reset(); return mNCur;}
-    mIDeb++; if(mIDeb==mLenBuf) mIDeb=0;
-    return mNCur;
-  }
-
-  inline uint_4 Push(r_8 x,r_8 y)
-  // ---- Pour ajouter une donnee, la donnee la plus ancienne
-  //      est enlevee si le buffer est deja plein.
-  {
-    uint_4 ifill;
-    if(mNCur==mLenBuf) {
-      r_8 X=mX[mIDeb]-mX0, Y=mY[mIDeb]-mY0; r_8 X2 = X*X;
-      mSx  -= X;     mSy   -=Y;
-      mSx2 -= X2;    mSy2  -=Y*Y;   mSxy -= X*Y;
-      mSx3 -= X2*X;  mSx2y -=X*X*Y;
-      mSx4 -= X2*X2;
-      ifill = mIDeb;
-      mIDeb++; if(mIDeb==mLenBuf) mIDeb=0;
-    } else {
-      ifill = (mIDeb+mNCur)%mLenBuf;
-      mNCur++;
-    }
-    mX[ifill] = x; mY[ifill] = y;
-    x -= mX0; y -= mY0; r_8 x2 = x*x;
-    mSx += x; mSy += y;
-    mSx2 += x2; mSy2 += y*y; mSxy += x*y;
-    mSx3 += x2*x; mSx2y += x2*y;
-    mSx4 += x2*x2;
-    mNPush++;
-    // Il faut re-synchroniser pour eviter les derives numeriques
-    mIResynch++; if(mIResynch == mNResynch) ReComputeSum();
-    return mNCur;
-  }
-
-  //***************************************************************** 
-  inline uint_4 ReComputeSum(void)
-  // ---- Pour re-synchroniser (eviter les derives numeriques).
-  {
-    if(mNCur==0) return 0;
-    // Re-centrage automatique a la moyenne demande:
-    // Attention, mSx = sum(x-mX0) ==> nouvel mX0 = mSx/N + mX0(ancien)
-    if(mAutoXY0) {mX0 = mSx/(r_8)mNCur + mX0; mY0 = mSy/(r_8)mNCur + mY0;}
-    mSx=mSy=mSx2=mSy2=mSxy=mSx3=mSx2y=mSx4=0.;
-    for(uint_4 i=mIDeb;i<mIDeb+mNCur;i++) {
-      uint_4 ii = i%mLenBuf;
-      r_8 x=mX[ii]-mX0, y=mY[ii]-mY0; r_8 x2 = x*x;
-      mSx  += x;     mSy   += y;
-      mSx2 += x2;    mSy2  += y*y;   mSxy += x*y;
-      mSx3 += x2*x;  mSx2y += x2*y;
-      mSx4 += x2*x2;
-    }
-    mIResynch=0;
-    mNResynchEff++;
-    return mNCur;
-  }
-
-  //***************************************************************** 
-  // ---- Retourne le nombre de points
+  void Reset(void);
+  uint_4 Pop(void);
+  uint_4 Push(r_8 x,r_8 y);
   inline uint_4 NPoints(void) {return mNCur;}
 
-  inline r_8 Compute(r_8& mean,bool recomputeXi2=false)
-  // ---- Calcul <y>, Var(y)
-  //   recomputeXi2=true : recalcule le xi2 (sigma) avec la courbe et les points
-  {
-    mean=0.;
-    if(mNCur==0) return -1.;
-    // Moyenne
-    mean  = mSy/(r_8) mNCur;
-    // Sigma
-    r_8 sigma;
-    if(recomputeXi2) {
-      sigma=0.;
-      for(uint_4 i=mIDeb;i<mIDeb+mNCur;i++) {
-        uint_4 ii = i%mLenBuf;
-        r_8 s = mean - (mY[ii]-mY0);
-	sigma += s*s;
-      }
-      sigma /= (r_8) mNCur;
-    } else {
-      sigma = mSy2/(r_8) mNCur - mean*mean;
-    }
-    // gestion du decalage
-    mean += mY0;
+  r_8 SumX(void) {return mSx+mNCur*mX0;}
+  r_8 SumY(void) {return mSy+mNCur*mY0;}
 
-    if(sigma>0.) return sqrt(sigma);
-    if(sigma<0.) return -sqrt(-sigma);
-    return sigma;
-  }
+  uint_4 ReComputeSum(void);
+  r_8 Compute(r_8& mean,bool recomputeXi2=false);
+  r_8 Compute(r_8& a0,r_8 &a1,bool recomputeXi2=false);
+  r_8 Compute(r_8& a0,r_8 &a1,r_8 &a2,bool recomputeXi2=false);
 
-  inline r_8 Compute(r_8& a0,r_8 &a1,bool recomputeXi2=false)
-  // ---- Calcul y=a0+a1*x et slin=Var(y-(a0+a1*x))=sqrt(<dy^2>)
-  //   recomputeXi2=true : recalcule le xi2 avec la courbe et les points
-  {
-    a0=a1=0.;
-    if(mNCur==0) return -1.;
-    // Fit lineaire
-    r_8 w = mNCur*mSx2 - mSx*mSx;
-    if(w==0. || mNCur==1) return -2.;
-    a0 = (mSx2*mSy - mSx*mSxy)/w;
-    a1 = (mNCur*mSxy - mSx*mSy )/w;
-    // Sigma par rapport Fit lineaire 
-    // (On a XI2=mNCur*slin**2 dans notre cas ou les erreurs=1)
-    r_8 slin;
-    if(recomputeXi2) {
-      slin=0.;
-      for(uint_4 i=mIDeb;i<mIDeb+mNCur;i++) {
-        uint_4 ii = i%mLenBuf;
-        r_8 s = a0+a1*(mX[ii]-mX0) - (mY[ii]-mY0);
-	slin += s*s;
-      }
-      slin /= (r_8) mNCur;
-    } else {
-      slin = (mSy2 +a0*a0*mNCur +a1*a1*mSx2 -2.*a0*mSy -2.*a1*mSxy +2.*a0*a1*mSx)
-             / (r_8)mNCur;
-    }
-    // gestion du decalage y-y0 = a0 + a1*(x-x0)
-    a0 = mY0 + a0 - a1*mX0;
-
-    if(slin>0.) return sqrt(slin);
-    if(slin<0.) return -sqrt(-slin);
-    return slin;
-  }
-
-  inline r_8 Compute(r_8& a0,r_8 &a1,r_8 &a2,bool recomputeXi2=false)
-  // ---- Calcul y=a0+a1*x+a2*x^2 et spar=Var(y-(a0+a1*x+a2*x^2))=sqrt(<dy^2>)
-  //   recomputeXi2=true : recalcule le xi2 avec la courbe et les points
-  {
-    a0=a1=a2=0.;
-    if(mNCur==0) return -1.;
-    // Fit parabolique
-    r_8 w = mSx2*(mSx2*mSx2-mSx3*mSx) -mSx*(mSx3*mSx2-mSx4*mSx) +mNCur*(mSx3*mSx3-mSx4*mSx2);
-    if(w==0. || mNCur<=2) return -2.;
-    a2 =  (mSy*(mSx2*mSx2-mSx3*mSx)  - mSxy*(mSx*mSx2-mSx3*mNCur)  + mSx2y*(mSx*mSx-mSx2*mNCur) )/w;
-    a1 = -(mSy*(mSx3*mSx2-mSx4*mSx)  - mSxy*(mSx2*mSx2-mSx4*mNCur) + mSx2y*(mSx2*mSx-mSx3*mNCur))/w;
-    a0 =  (mSy*(mSx3*mSx3-mSx4*mSx2) - mSxy*(mSx2*mSx3-mSx4*mSx)   + mSx2y*(mSx2*mSx2-mSx3*mSx) )/w;
-    // Sigma par rapport Fit parabolique
-    // (On a XI2=mNCur*spar**2 dans notre cas ou les erreurs=1)
-    // Le calcul direct du Xi2 n'est pas precis
-    r_8 spar;
-    if(recomputeXi2) {
-      spar=0.;
-      for(uint_4 i=mIDeb;i<mIDeb+mNCur;i++) {
-        uint_4 ii = i%mLenBuf;
-        r_8 s = a0+(a1+a2*(mX[ii]-mX0))*(mX[ii]-mX0) - (mY[ii]-mY0);
-	spar += s*s;
-      }
-      spar /= (r_8) mNCur;
-    } else {
-      spar = (mSy2 +a0*a0*mNCur +a1*a1*mSx2 +a2*a2*mSx4 -2.*mSy*a0 -2.*a1*mSxy
-              -2.*a2*mSx2y +2.*a0*a1*mSx +2.*a0*a2*mSx2 +2.*a1*a2*mSx3)
-             / (r_8) mNCur;
-    }
-    // gestion du decalage y-y0 = a0 + a1*(x-x0) + a2*(x-x0)^2
-    a0 = mY0 + a0 - a1*mX0 + a2*mX0*mX0;
-    a1 = a1 - 2.*a2*mX0;
-
-    if(spar>0.) return sqrt(spar);
-    if(spar<0.) return -sqrt(-spar);
-    return spar;
-  }
-
-  //***************************************************************** 
-  void Print(int lp=0)
-  // ---- Print de l'etat de la classe
-  //      lp = 0 : parametres
-  //           1 :            + sommes
-  //           2 :                     + tableaux
-  {
-    cout<<"SLinParBuff(LenBuf="<<mLenBuf<<",NResynch="<<mNResynch
-        <<",auto_xy0="<<mAutoXY0
-        <<"): mX0="<<mX0<<" mY0="<<mY0<<" mNCur="<<mNCur<<endl
-        <<"           NPush="<<mNPush<<" NPop="<<mNPop
-        <<" NSynchro="<<mNResynchEff<<endl;
-    if(mNCur==0) return;
-    if(lp>=2) {
-      cout<<"X:";
-      if(mX) for(uint_4 i=0;i<mNCur;i++) {
-        uint_4 ii = (mIDeb+i)%mLenBuf;
-        cout<<" "<<mX[ii]; if(i%10==9 || i==mNCur-1) cout<<endl;
-      }
-      if(mY) cout<<"Y:";
-      for(uint_4 i=0;i<mNCur;i++) {
-        uint_4 ii = (mIDeb+i)%mLenBuf;
-        cout<<" "<<mY[ii]; if(i%10==9 || i==mNCur-1) cout<<endl;
-      }
-    }
-    if(lp>=1) {
-      cout<<"...IDeb="<<mIDeb<<" IResynch="<<mIResynch<<endl;
-      cout<<"   Sx="<<mSx<<" Sx2="<<mSx2<<" Sx3="<<mSx3<<" Sx4="<<mSx4<<endl
-          <<"   Sy="<<mSy<<" Sy2="<<mSy2<<" Sxy="<<mSxy<<" Sx2y="<<mSx2y<<endl;
-    }
-  }
-
-  void PrintCompute(int lp=0)
-  // ---- Print des valeurs numeriques calculees
-  //      lp = 0 : valeurs calculees
-  //           1 :             + sommes
-  {
-    bool recompute = (mX==NULL || mY==NULL) ? false: true;
-    r_8 mean;
-    r_8 sigma = Compute(mean,recompute), sigmar = Compute(mean,false);
-    cout<<"SLinParBuff: n="<<NPoints()<<" mean="<<mean
-        <<" sigma="<<sigma<<" (raw="<<sigmar<<")"<<endl;
-    r_8 a0,a1,a2;
-    r_8 slin  = Compute(a0,a1,recompute), slinr  = Compute(a0,a1,false);
-    cout<<"             a0="<<a0<<" a1="<<a1
-        <<" slin="<<slin<<" (raw="<<slinr<<")"<<endl;
-    r_8 spar = Compute(a0,a1,a2,recompute), sparr = Compute(a0,a1,a2,false);
-    cout<<"             a0="<<a0<<" a1="<<a1<<" a2="<<a2
-        <<" spar="<<spar<<" (raw="<<sparr<<")"<<endl;
-    if(lp<1) return;
-    cout<<"...Sx="<<mSx<<" Sx2="<<mSx2<<" Sx3="<<mSx3<<" Sx4="<<mSx4<<endl
-        <<"   Sy="<<mSy<<" Sy2="<<mSy2<<" Sxy="<<mSxy<<" Sx2y="<<mSx2y<<endl;
-  }
+  void Print(int lp=0);
+  void PrintCompute(int lp=0);
 
 protected:
@@ -329,4 +45,5 @@
   uint_4 mNResynchEff, mNPush, mNPop;
 };
+
 
 ///////////////////////////////////////////////////////////////////
@@ -343,46 +60,14 @@
 class SLinParBuffMerger {
 public:
-  SLinParBuffMerger(void) {mFirst=true; mSlp.Reset();}
-  SLinParBuffMerger(SLinParBuff& s,bool recompute=false)
-                   {mFirst=true; mSlp.Reset(); Add(s,recompute);}
-  virtual ~SLinParBuffMerger(void) {}
-  inline uint_4  NPoints(void) {return mSlp.NPoints();}
+  SLinParBuffMerger(void);
+  SLinParBuffMerger(SLinParBuff& s,bool recompute=false);
+  virtual ~SLinParBuffMerger(void);
+
+  inline uint_4 NPoints(void) {return mSlp.NPoints();}
   inline void Reset(void) {mSlp.Reset(); mFirst=true;}
-  inline void Add(SLinParBuff& s,bool recompute=false)
-  {
-    bool changex0y0=false, AutoXY0_Save; r_8 X0_Save,Y0_Save;
-    if(mFirst) {
-      // Cas ou c'est le premier SLinParBuff additionne.
-      mSlp.mX0=s.mX0; mSlp.mY0=s.mY0; mFirst=false;
-    } else if(mSlp.mX0!=s.mX0 || mSlp.mY0!=s.mY0) {
-      // Attention: pour merger il faut avoir les memes mX0,mY0
-      changex0y0=true;
-      X0_Save=s.mX0; Y0_Save=s.mY0; AutoXY0_Save=s.mAutoXY0;
-      s.mX0=mSlp.mX0; s.mY0=mSlp.mY0; s.mAutoXY0=false;
-      recompute=true;
-    }
-    if(recompute) s.ReComputeSum();
-    mSlp.mNCur += s.mNCur;
-    mSlp.mSx   += s.mSx;
-    mSlp.mSy   += s.mSy;
-    mSlp.mSx2  += s.mSx2;
-    mSlp.mSy2  += s.mSy2;
-    mSlp.mSxy  += s.mSxy;
-    mSlp.mSx3  += s.mSx3;
-    mSlp.mSx2y += s.mSx2y;
-    mSlp.mSx4  += s.mSx4;
-    // Dans le cas ou on a change les X0,Y0, on remet en etat
-    if(changex0y0) {
-      s.mX0=X0_Save; s.mY0=Y0_Save;
-      s.ReComputeSum();
-      s.mAutoXY0=AutoXY0_Save;
-    }
-  }
-  inline r_8 Compute(r_8& mean)
-              {return mSlp.Compute(mean);}
-  inline r_8 Compute(r_8& a0,r_8 &a1)
-              {return mSlp.Compute(a0,a1);}
-  inline r_8 Compute(r_8& a0,r_8 &a1,r_8 &a2)
-              {return mSlp.Compute(a0,a1,a2);}
+  void Add(SLinParBuff& s,bool recompute=false);
+  inline r_8 Compute(r_8& mean) {return mSlp.Compute(mean);}
+  inline r_8 Compute(r_8& a0,r_8 &a1) {return mSlp.Compute(a0,a1);}
+  inline r_8 Compute(r_8& a0,r_8 &a1,r_8 &a2) {return mSlp.Compute(a0,a1,a2);}
   inline void Print(int lp=0) {mSlp.Print(lp);}
   inline void PrintCompute(int lp=0) {mSlp.PrintCompute(lp);}
Index: trunk/SophyaLib/NTools/smakefile
===================================================================
--- trunk/SophyaLib/NTools/smakefile	(revision 3567)
+++ trunk/SophyaLib/NTools/smakefile	(revision 3572)
@@ -4,8 +4,8 @@
  
 clean:
-	 rm -f $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)imageop.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o
+	 rm -f $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)imageop.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)slinparbuff.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o
 	rm -f $(SOPHYALIBP)libNTools.a
  
-$(SOPHYALIBP)libNTools.a : $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o
+$(SOPHYALIBP)libNTools.a : $(SOPHYAOBJP)cimage.o $(SOPHYAOBJP)cspline.o $(SOPHYAOBJP)datatypes.o $(SOPHYAOBJP)dates.o $(SOPHYAOBJP)datime.o $(SOPHYAOBJP)difeq.o $(SOPHYAOBJP)dynccd.o $(SOPHYAOBJP)fct1dfit.o $(SOPHYAOBJP)fct2dfit.o $(SOPHYAOBJP)fftmayer_r4.o $(SOPHYAOBJP)fftmayer_r8.o $(SOPHYAOBJP)fftmserver.o $(SOPHYAOBJP)fftpackc.o $(SOPHYAOBJP)fftpserver.o $(SOPHYAOBJP)fftservintf.o $(SOPHYAOBJP)FSAppIrrSmpl.o $(SOPHYAOBJP)functab.o $(SOPHYAOBJP)generaldata.o $(SOPHYAOBJP)generalfit.o $(SOPHYAOBJP)generalfunc.o $(SOPHYAOBJP)integ.o $(SOPHYAOBJP)matxop.o $(SOPHYAOBJP)median.o $(SOPHYAOBJP)nbmath.o $(SOPHYAOBJP)nbtri.o $(SOPHYAOBJP)ntoolsinit.o $(SOPHYAOBJP)objfitter.o $(SOPHYAOBJP)perandom.o $(SOPHYAOBJP)poly.o $(SOPHYAOBJP)rk4cdifeq.o $(SOPHYAOBJP)simplesort.o $(SOPHYAOBJP)simplex.o $(SOPHYAOBJP)slinparbuff.o $(SOPHYAOBJP)tabmath.o $(SOPHYAOBJP)toeplitzMatrix.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
@@ -641,4 +641,10 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  simplex.cc
  
+$(SOPHYAOBJP)slinparbuff.o: slinparbuff.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)machdefs.h slinparbuff.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  slinparbuff.cc
+ 
 $(SOPHYAOBJP)tabmath.o: tabmath.cc $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h tabmath.h peida.h \
Index: trunk/SophyaLib/SUtils/datacards.cc
===================================================================
--- trunk/SophyaLib/SUtils/datacards.cc	(revision 3567)
+++ trunk/SophyaLib/SUtils/datacards.cc	(revision 3572)
@@ -1,4 +1,4 @@
 //
-// $Id: datacards.cc,v 1.10 2004-09-10 09:54:48 cmv Exp $
+// $Id: datacards.cc,v 1.11 2009-02-07 21:49:59 cmv Exp $
 //
 //
@@ -217,5 +217,5 @@
 DataCards::GetKey(int num) const
 {
-  if ((num < 0) || (num >= cards.size()) )  return("");
+  if ((num < 0) || (num >= (int)cards.size()) )  return("");
   int k = 0;
   CardList::const_iterator i;
@@ -234,5 +234,5 @@
   DataCards::CardList::const_iterator it = FindKeyC(key);
   if (it == cards.end()) return(rs);
-  for (int k=0; k<(*it).tokens.size(); k++) {
+  for (size_t k=0; k<(*it).tokens.size(); k++) {
     rs += ' ';  rs += (*it).tokens[k];
   }
@@ -246,5 +246,5 @@
   DataCards::CardList::const_iterator it = FindKeyC(key);
   if (it == cards.end()) return(def);
-  if ( (numero < 0) || (numero >= (*it).tokens.size()) )  return def;
+  if ( (numero < 0) || (numero >= (int)((*it).tokens.size())) )  return def;
   return (*it).tokens[numero];
 }
@@ -308,5 +308,5 @@
 DataCards::ApplyPF(CrdPF & cpf, string const& key, string const& toks)
 {
-int l,lk;
+size_t l,lk;
 int rc = 0;
 // On verifie si le "pattern" correspond
Index: trunk/SophyaLib/SUtils/strutilxx.cc
===================================================================
--- trunk/SophyaLib/SUtils/strutilxx.cc	(revision 3567)
+++ trunk/SophyaLib/SUtils/strutilxx.cc	(revision 3572)
@@ -13,5 +13,5 @@
 // considering char "sep" as a separator.
 // Vector is filled from its end (no reset done).
-// Tp write a "sep" char, use \'sep'
+// To write a "sep" char, use \'sep'
 // Warning: separator "sep" could not be set to '\'
 // Ex: sep=' ': s="aaa   bbb cc d " -> vs=(aaa,bbb,cc,d)
@@ -55,10 +55,10 @@
 // - Fill "vs" at the end: NO RESET IS DONE
 // - If ',' is the separator, ",,," is c
-// That routine is much more rapid than FillVStringFrString altouch less general
+// That routine is much more rapid than FillVStringFrString although less general
 //           (ex no '\' gestion is done)
 {
  uint_4 ls = s.size();
  if(ls<=0) return;
- bool sep_non_blanc = (separator==' ')? false: true;
+ //bool sep_non_blanc = (separator==' ')? false: true;
  char *str = new char[ls+2];
 
Index: trunk/SophyaLib/SUtils/utils.cc
===================================================================
--- trunk/SophyaLib/SUtils/utils.cc	(revision 3567)
+++ trunk/SophyaLib/SUtils/utils.cc	(revision 3572)
@@ -1,5 +1,5 @@
 // This may look like C code, but it is really -*- C++ -*-
 //
-// $Id: utils.cc,v 1.2 2004-09-10 09:54:49 cmv Exp $
+// $Id: utils.cc,v 1.3 2009-02-07 21:49:59 cmv Exp $
 //
 
@@ -15,5 +15,5 @@
   int i;   // THINK C ne veut pas du int i dans chaque for...
   if (dest < source)
-    for (i=0; i<n; i++)
+    for (i=0; i<(int)n; i++)
       ((char*)dest)[i] = ((char*)source)[i];
   else 
Index: trunk/SophyaLib/Samba/Makefile
===================================================================
--- trunk/SophyaLib/Samba/Makefile	(revision 3567)
+++ trunk/SophyaLib/Samba/Makefile	(revision 3572)
@@ -12,24 +12,24 @@
  
 $(SOPHYAOBJP)alm.o: alm.cc $(SOPHYAINCP)sopnamsp.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)stsrand.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)smathconst.h \
   $(SOPHYAINCP)triangmtx.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)utilarr.h \
@@ -93,8 +93,9 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)stsrand.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)smathconst.h \
   $(SOPHYAINCP)triangmtx.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)nbconst.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  lambdaBuilder.cc
@@ -198,10 +199,11 @@
   $(SOPHYAINCP)fftservintf.h \
   $(SOPHYAINCP)fftpserver.h \
-  $(SOPHYAINCP)fftservintf.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)stsrand.h alm.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)triangmtx.h \
   $(SOPHYAINCP)tvector.h lambdaBuilder.h \
   $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  sphericaltransformserver.cc
Index: trunk/SophyaLib/Samba/bruit.cc
===================================================================
--- trunk/SophyaLib/Samba/bruit.cc	(revision 3567)
+++ trunk/SophyaLib/Samba/bruit.cc	(revision 3572)
@@ -220,8 +220,7 @@
 //--
 {
-int i,j;
 printf("OOFNoise::Print()  MemL=%d  Tau= %g \n", mMemL, mTau);
 printf("OOFNoise::Print() Vecteur de Dynamique / Etat : \n");
-for(i=0; i<mMemL-1; i+=2) 
+for(int i=0; i<mMemL-1; i+=2) 
   printf("%d:   D=%g  S=%g   | %d:  D=%g  S=%g \n", i, 
          mDyn[i], mState[i], i+1, mDyn[i], mState[i]);   
@@ -311,9 +310,8 @@
 //--
 {
-int i,j;
-printf("EXPNoise::Print()  MemL=%d  Tau= %g \n", mMemL, mTau);
+printf("EXPNoise::Print()  MemL=%ld  Tau= %g \n", mMemL, mTau);
 printf("EXPNoise::Print() Vecteur de Dynamique / Etat : \n");
-for(i=0; i<mMemL-1; i+=2) 
-  printf("%d:   D=%g  S=%g   | %d:  D=%g  S=%g \n", i, 
+for(long int i=0; i<mMemL-1; i+=2) 
+  printf("%ld:   D=%g  S=%g   | %ld:  D=%g  S=%g \n", i, 
          mDyn[i], mState[i], i+1, mDyn[i], mState[i]);   
 
@@ -608,9 +606,9 @@
 //--
 {
-int i,j,rc=0;
+int rc=0;
 printf("MemNoise::Print()  MemL=%d  Tau= %g \n", mMemL, mTau);
 printf("mNtirage= %d , mMemPos= %d , mMemNeg= %d \n",mNtirage,mMemPos,mMemNeg);
 // printf("MemNoise::Print() Vecteur de Dynamique / Etat : \n");
-/* for(i=0; i<mMemL-1; i+=2) 
+/* for(int i=0; i<mMemL-1; i+=2) 
   printf("%d:   D=%g  S=%g   | %d:  D=%g  S=%g \n", i, 
          mDyn[i], mState[i], i+1, mDyn[i], mState[i]);   
Index: trunk/SophyaLib/Samba/lambdaBuilder.cc
===================================================================
--- trunk/SophyaLib/Samba/lambdaBuilder.cc	(revision 3567)
+++ trunk/SophyaLib/Samba/lambdaBuilder.cc	(revision 3572)
@@ -137,5 +137,5 @@
   register r_8 lam_0, lam_1, lam_2;
 
-  int_4 l, m, k;
+  int_4 m, k;
 
   for (m=0; m<=mmax;m++)   {
@@ -194,5 +194,5 @@
   register r_8 lam_0, lam_1, lam_2;
   
-  int_4 l, m, k;
+  int_4 m, k;
 
   for (m=0; m<=mmax;m++)  {
@@ -235,5 +235,5 @@
   register r_8 lam_0, lam_1, lam_2;
   
-  int_4 l, m, k;
+  int_4 m, k;
 
   for (m=0; m<=mmax;m++)  {
Index: trunk/SophyaLib/Samba/smakefile
===================================================================
--- trunk/SophyaLib/Samba/smakefile	(revision 3567)
+++ trunk/SophyaLib/Samba/smakefile	(revision 3572)
@@ -12,24 +12,24 @@
  
 $(SOPHYAOBJP)alm.o: alm.cc $(SOPHYAINCP)sopnamsp.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)stsrand.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ndatablock.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)smathconst.h \
   $(SOPHYAINCP)triangmtx.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)utilarr.h \
@@ -93,8 +93,9 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)stsrand.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)smathconst.h \
   $(SOPHYAINCP)triangmtx.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)nbconst.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  lambdaBuilder.cc
@@ -198,10 +199,11 @@
   $(SOPHYAINCP)fftservintf.h \
   $(SOPHYAINCP)fftpserver.h \
-  $(SOPHYAINCP)fftservintf.h alm.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)stsrand.h alm.h \
   $(SOPHYAINCP)nbmath.h \
   $(SOPHYAINCP)triangmtx.h \
   $(SOPHYAINCP)tvector.h lambdaBuilder.h \
   $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  sphericaltransformserver.cc
Index: trunk/SophyaLib/Samba/sphericaltransformserver.cc
===================================================================
--- trunk/SophyaLib/Samba/sphericaltransformserver.cc	(revision 3567)
+++ trunk/SophyaLib/Samba/sphericaltransformserver.cc	(revision 3572)
@@ -211,5 +211,4 @@
   int_4 nlmax=alm.Lmax();
   int_4 nmmax=nlmax;
-  int_4 nsmax=0;
   // le Resize est suppose mettre a zero
   map.Resize(pixelSizeIndex);
@@ -521,5 +520,5 @@
   
   alm.ReSizeToLmax(nlmax);
-  for (int_4 ith = 0; ith < map.NbThetaSlices(); ith++)
+  for (uint_4 ith = 0; ith < map.NbThetaSlices(); ith++)
     {
       r_8 phi0;
@@ -917,5 +916,5 @@
       throw SzMismatchError("SphericalTransformServer::DecomposeToAlm: map Q and map U have not same size ");
     }
-  for (int_4 ith = 0; ith < mapq.NbThetaSlices(); ith++)
+  for (uint_4 ith = 0; ith < mapq.NbThetaSlices(); ith++)
     {
       r_8 phi0;
@@ -1119,5 +1118,5 @@
   Bm<complex<T> > b_m_theta_u(nmmax);
 
-  for (int_4 ith = 0; ith < mapq.NbThetaSlices();ith++)
+  for (uint_4 ith = 0; ith < mapq.NbThetaSlices();ith++)
     {
       int_4 nph;
@@ -1228,5 +1227,5 @@
   Bm<complex<T> > b_m_theta_p(nmmax);
   Bm<complex<T> > b_m_theta_m(nmmax);
-  for (int_4 ith = 0; ith < mapq.NbThetaSlices();ith++)
+  for (uint_4 ith = 0; ith < mapq.NbThetaSlices();ith++)
     {
       int_4 nph;
Index: trunk/SophyaLib/SkyMap/fiolocalmap.cc
===================================================================
--- trunk/SophyaLib/SkyMap/fiolocalmap.cc	(revision 3567)
+++ trunk/SophyaLib/SkyMap/fiolocalmap.cc	(revision 3572)
@@ -167,5 +167,4 @@
   int_4 nSzX= dobj->Size_x();
   int_4 nSzY= dobj->Size_y();
-  int_4 nPix= dobj->NbPixels();
  
   if(dobj->ptrInfo()) 
@@ -183,5 +182,4 @@
   os.PutI4(nSzX);
   os.PutI4(nSzY);
-  //  os.PutI4(nPix);
 
   if(dobj->LocalMap_isDone())
Index: trunk/SophyaLib/SkyMap/localmap.cc
===================================================================
--- trunk/SophyaLib/SkyMap/localmap.cc	(revision 3567)
+++ trunk/SophyaLib/SkyMap/localmap.cc	(revision 3572)
@@ -256,5 +256,4 @@
     throw(SzMismatchError("LocalMap<T>::CopyElt(const LocalMap<T>&) SizeMismatch")) ;
       recopierVariablesSimples(a);     
-  int k;
   pixels_ = a.pixels_;
   return(*this);
@@ -349,6 +348,4 @@
   double csTheta = cos(theta);
   double snTheta = sin(theta);
-  double csPhi   = cos(phi);
-  double snPhi   = sin(phi); 
   double csPhiMPhiC = cos (phi - phiC_);
   double snPhiMPhiC = sin (phi - phiC_);
@@ -585,5 +582,5 @@
   double sin_phi_axeZ;
 
-  double cth,sth, cdeltaPhi, phi, cphi, sphi;
+  double cth,sth, cdeltaPhi, phi;
 
   if ( snthC_ <= 0.) // carte centree au pole 
Index: trunk/SophyaLib/SkyMap/spherehealpix.cc
===================================================================
--- trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 3567)
+++ trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 3572)
@@ -177,15 +177,14 @@
   nPix_ = a.nPix_;
   omeg_ = a.omeg_;
-  int k;
   if (fgring_ == a.fgring_) 
-    for (k=0; k< nPix_; k++) pixels_(k) = a.pixels_(k);
+    for (int_4 k=0; k< nPix_; k++) pixels_(k) = a.pixels_(k);
   else {
-    if (fgring_)  for (k=0; k< nPix_; k++) 
+    if (fgring_)  for (int_4 k=0; k< nPix_; k++) 
       pixels_(k) = a.pixels_(ring2nest(nSide_, k));
-    else  for (k=0; k< nPix_; k++) 
+    else  for (int_4 k=0; k< nPix_; k++) 
       pixels_(k) = a.pixels_(nest2ring(nSide_, k));			     
   }
-  for (k=0; k< a.sliceBeginIndex_.Size(); k++) sliceBeginIndex_(k) = a.sliceBeginIndex_(k);
-  for (k=0; k< a.sliceLenght_.Size(); k++) sliceLenght_(k) = a.sliceLenght_(k);
+  for (size_t k=0; k< a.sliceBeginIndex_.Size(); k++) sliceBeginIndex_(k) = a.sliceBeginIndex_(k);
+  for (size_t k=0; k< a.sliceLenght_.Size(); k++) sliceLenght_(k) = a.sliceLenght_(k);
   return(*this);
 }
@@ -305,5 +304,5 @@
 {
   uint_4 nbslices = uint_4(4*nSide_-1);
-  if (index<0 || index >= nbslices) 
+  if (index<0 || index >= (int_4)nbslices) 
     throw RangeCheckError(" SphereHEALPix::ThetaOfSlice()  index out of range");
   r_8 theta, phi0;
@@ -322,5 +321,5 @@
 int_4 SphereHEALPix<T>::GetSymThetaSliceIndex(int_4 idx) const
 {
-  if(idx < 0 || idx >= NbThetaSlices()) 
+  if(idx < 0 || idx >= (int_4)NbThetaSlices()) 
     throw RangeCheckError("SphereHEALPix::GetSymThetaSliceIndex index out of range"); 
   return (NbThetaSlices()-1-idx);
@@ -340,5 +339,5 @@
 void SphereHEALPix<T>::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 
 {
-  if (index<0 || index >= NbThetaSlices()) 
+  if (index<0 || index >= (int_4)NbThetaSlices()) 
     throw RangeCheckError(" SphereHEALPix::GetThetaSlice()  index out of range");
 
@@ -391,5 +390,5 @@
 {
 
-  if (sliceIndex<0 || sliceIndex >= NbThetaSlices()) 
+  if (sliceIndex<0 || sliceIndex >= (int_4)NbThetaSlices()) 
     throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range");
   int_4 iring= sliceBeginIndex_(sliceIndex);
@@ -420,5 +419,5 @@
 
 {
-  if (sliceIndex<0 || sliceIndex >= NbThetaSlices()) 
+  if (sliceIndex<0 || sliceIndex >= (int_4)NbThetaSlices()) 
     throw RangeCheckError(" SphereHEALPix::GetThetaSliceDataPtr(): index out of range");
   if (fgring_) 
Index: trunk/SophyaLib/SkyMap/spherepos.cc
===================================================================
--- trunk/SophyaLib/SkyMap/spherepos.cc	(revision 3567)
+++ trunk/SophyaLib/SkyMap/spherepos.cc	(revision 3572)
@@ -11,5 +11,4 @@
 #include <typeinfo>
 
-static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.cc,v 1.4 2006-06-20 16:01:48 ansari Exp $";
 
 
Index: trunk/SophyaLib/SkyMap/spherepos.h
===================================================================
--- trunk/SophyaLib/SkyMap/spherepos.h	(revision 3567)
+++ trunk/SophyaLib/SkyMap/spherepos.h	(revision 3572)
@@ -9,5 +9,4 @@
 #include "anydataobj.h"
 
-static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.h,v 1.2 2006-06-20 16:01:48 ansari Exp $";
 
 namespace SOPHYA {
Index: trunk/SophyaLib/SkyMap/spherethetaphi.cc
===================================================================
--- trunk/SophyaLib/SkyMap/spherethetaphi.cc	(revision 3567)
+++ trunk/SophyaLib/SkyMap/spherethetaphi.cc	(revision 3572)
@@ -192,9 +192,8 @@
   NPix_  = a.NPix_;
   Omega_ = a.Omega_;
-  int_4 k;
-  for (k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k);
-  for (k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k);
-  for (k=0; k< a.TNphi_.Size(); k++) TNphi_(k) = a.TNphi_(k);
-  for (k=0; k< a.Theta_.Size(); k++) Theta_(k) = a.Theta_(k);
+  for (int_4 k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k);
+  for (size_t k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k);
+  for (size_t k=0; k< a.TNphi_.Size(); k++) TNphi_(k) = a.TNphi_(k);
+  for (size_t k=0; k< a.Theta_.Size(); k++) Theta_(k) = a.Theta_(k);
   return(*this);
 
@@ -613,5 +612,5 @@
 int_4 SphereThetaPhi<T>::GetSymThetaSliceIndex(int_4 idx) const
 {
-  if(idx < 0 || idx >= NbThetaSlices()) 
+  if(idx < 0 || idx >= (int_4)NbThetaSlices()) 
     throw RangeCheckError("SphereThetaPhi::GetSymThetaSliceIndex index out of range"); 
   return (NbThetaSlices()-1-idx);
@@ -630,5 +629,5 @@
 {
 
-  if(index < 0 || index >= NbThetaSlices()) 
+  if(index < 0 || index >= (int_4)NbThetaSlices()) 
     throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...) index out of range"); 
     
@@ -665,5 +664,5 @@
 {
 
-  if(index < 0 || index >= NbThetaSlices()) 
+  if(index < 0 || index >= (int_4)NbThetaSlices()) 
     throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...)  idx out of range"); 
 
@@ -673,6 +672,4 @@
   pixelIndices.ReSize(lring);
   value.ReSize(lring);
-  double Te= 0.;
-  double Fi= 0.;
   for(int_4 kk = 0; kk < lring; kk++)  {
     pixelIndices(kk)=kk+iring ;
@@ -686,5 +683,5 @@
 T* SphereThetaPhi<T>::GetThetaSliceDataPtr(int_4 index)
 {
-  if(index < 0 || index >= NbThetaSlices()) 
+  if(index < 0 || index >= (int_4)NbThetaSlices()) 
     throw RangeCheckError("SphereThetaPhi::GetThetaSliceDataPtr(idx)  idx out of range"); 
   return pixels_.Begin()+Index(index,0);
Index: trunk/SophyaLib/SysTools/commander.h
===================================================================
--- trunk/SophyaLib/SysTools/commander.h	(revision 3567)
+++ trunk/SophyaLib/SysTools/commander.h	(revision 3572)
@@ -79,5 +79,5 @@
                                         string& grp);
   inline  void		RegisterCommand(string& keyw, string& usage, CmdExecutor * ce, 
-                                        char* grp)
+                                        const char* grp)
                         { string sgrp = grp; RegisterCommand(keyw, usage, ce, sgrp); }
 
Index: trunk/SophyaLib/SysTools/cxxcmplnk.cc
===================================================================
--- trunk/SophyaLib/SysTools/cxxcmplnk.cc	(revision 3567)
+++ trunk/SophyaLib/SysTools/cxxcmplnk.cc	(revision 3572)
@@ -37,15 +37,12 @@
 */
 
-static char * gcxx_opt = 
-"-O -fdollars-in-identifiers";
-static char * KCC_opt = 
-"-O --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__";
-static char * icc_opt = 
-"-O -fpic -frtti";
-static char * cxx_opt = 
-"-O -no_implicit_include -pthread";
-static char * SGICC_opt =  "-O -prelink -D__SGICC__ -LANG:std";
-static char * xlC_opt = 
-"-O -qrtti=all -qeh=v6";
+static const char * gcxx_opt = "-O -fdollars-in-identifiers";
+static const char * KCC_opt = 
+  "-O --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__";
+static const char * icc_opt = "-O -fpic -frtti";
+static const char * cxx_opt = 
+  "-O -no_implicit_include -pthread";
+static const char * SGICC_opt =  "-O -prelink -D__SGICC__ -LANG:std";
+static const char * xlC_opt = "-O -qrtti=all -qeh=v6";
 
 /* --Methode-- */
@@ -251,6 +248,6 @@
 int CxxCompilerLinker::BuildSO(string const & oname, string & soname)
 {
-  //  char * soext = ".dylib"; if defined(Darwin) - pas necessaire Reza 02/2002
-  char * soext = ".so";
+  // const char * soext = ".dylib"; if defined(Darwin) - pas necessaire Reza 02/2002
+  const char * soext = ".so";
 
   if (soname.length() < 1) {
Index: trunk/SophyaLib/SysTools/timing.c
===================================================================
--- trunk/SophyaLib/SysTools/timing.c	(revision 3567)
+++ trunk/SophyaLib/SysTools/timing.c	(revision 3572)
@@ -115,7 +115,7 @@
           Comm, tcalt, tcal);
 
-printf("ElapsedTime(hh:mm:ss): Total= %02d:%02d:%02d ",
+printf("ElapsedTime(hh:mm:ss): Total= %02ld:%02ld:%02ld ",
        etmt/3600, (etmt%3600)/60, etmt%60);
-printf(" (Partial= %02d:%02d:%02d)\n",
+printf(" (Partial= %02ld:%02ld:%02ld)\n",
        etm/3600, (etm%3600)/60, etm%60);
 
Index: trunk/SophyaLib/TArray/basarr.cc
===================================================================
--- trunk/SophyaLib/TArray/basarr.cc	(revision 3567)
+++ trunk/SophyaLib/TArray/basarr.cc	(revision 3572)
@@ -22,5 +22,5 @@
 
 // Variables statiques globales
-char * BaseArray::ck_op_msg_[6] =
+const char * BaseArray::ck_op_msg_[6] =
      {"???", "Size(int )", "IsPacked(int )"
      ,"Stride(int )", "ElemCheckBound()", "operator()" };
Index: trunk/SophyaLib/TArray/basarr.h
===================================================================
--- trunk/SophyaLib/TArray/basarr.h	(revision 3567)
+++ trunk/SophyaLib/TArray/basarr.h	(revision 3572)
@@ -200,5 +200,5 @@
   DVList* mInfo;    //!< Infos (variables) attached to the array
 
-  static char * ck_op_msg_[6]; //!< Operation messages for CheckDI() CheckBound()
+  static const char * ck_op_msg_[6]; //!< Operation messages for CheckDI() CheckBound()
   static sa_size_t max_nprt_; //!< maximum number of printed elements
   static int_4 prt_lev_;  //!< Print level
Index: trunk/SophyaLib/TArray/triangmtx.h
===================================================================
--- trunk/SophyaLib/TArray/triangmtx.h	(revision 3567)
+++ trunk/SophyaLib/TArray/triangmtx.h	(revision 3572)
@@ -32,19 +32,28 @@
 
 //! Default constructor
-TriangularMatrix()   {;};
+TriangularMatrix()
+  : long_diag_(0)
+{
+}
+
 //! instanciate a triangular matrix from the number of rows
-TriangularMatrix(sa_size_t rowSize)  : long_diag_(rowSize) 
-  {
-    elem_.ReSize((rowSize*(rowSize+1)/2) ); 
-  }
+TriangularMatrix(sa_size_t rowSize)
+  : long_diag_(rowSize) 
+{
+  elem_.ReSize((rowSize*(rowSize+1)/2) ); 
+}
+
 //! Copy constructor (possibility of sharing datas)
-  TriangularMatrix(const TriangularMatrix<T>& a,  bool share=false)  : elem_(a.elem_, share),  long_diag_(a.long_diag_) {;}
+TriangularMatrix(const TriangularMatrix<T>& a,  bool share=false)  
+  : long_diag_(a.long_diag_) , elem_(a.elem_, share)  
+{
+}
 
 //! resize the matrix with a new number of rows
 inline void ReSizeRow(sa_size_t rowSize) 
-  {
-    long_diag_=(uint_4)rowSize;
-    elem_.ReSize(long_diag_*(long_diag_+1)/2);
-  }
+{
+  long_diag_=(uint_4)rowSize;
+  elem_.ReSize(long_diag_*(long_diag_+1)/2);
+}
 
 TriangularMatrix<T>& SetT(T a)
Index: trunk/SophyaLib/TArray/utilarr.cc
===================================================================
--- trunk/SophyaLib/TArray/utilarr.cc	(revision 3567)
+++ trunk/SophyaLib/TArray/utilarr.cc	(revision 3572)
@@ -142,5 +142,5 @@
 MuTyV & EnumeratedSequence::Value (sa_size_t k) const 
 {
-  if (k >= vecv_.size())  retv_ = 0;
+  if (k >= (sa_size_t)vecv_.size())  retv_ = 0;
   else retv_ = vecv_[k];
   return(retv_);
@@ -175,5 +175,5 @@
 {
   os << " EnumeratedSequence::Print() - Size()= " << Size() << endl;
-  for(int k=0; k<vecv_.size(); k++) {
+  for(size_t k=0; k<vecv_.size(); k++) {
     os << vecv_[k];
     if ((k > 0) && (k%10 == 0))  os << endl;
@@ -190,5 +190,5 @@
 sa_size_t EnumeratedSequence::Append(EnumeratedSequence const & seq)
 {
-  for(int k=0; k<seq.vecv_.size(); k++) 
+  for(size_t k=0; k<seq.vecv_.size(); k++) 
     vecv_.push_back(seq.vecv_[k]);
   return(seq.vecv_.size());
@@ -278,5 +278,5 @@
   nc = 0;
   sa_size_t n = 0;
-  char buff[256];
+  //char buff[256];
   string line;
   int nbad, nbadtot, nel;
