Index: /trunk/SophyaPI/PIext/Makefile
===================================================================
--- /trunk/SophyaPI/PIext/Makefile	(revision 1314)
+++ /trunk/SophyaPI/PIext/Makefile	(revision 1315)
@@ -4,5 +4,5 @@
  
 all: $(LIB)libPIext.a
-$(LIB)libPIext.a : $(OBJ)basexecut.o $(OBJ)cxxexecutor.o $(OBJ)cxxexecwin.o $(OBJ)nobjmgr.o $(OBJ)nomgadapter.o $(OBJ)nomgfdadapter.o $(OBJ)nomhistadapter.o $(OBJ)nomimagadapter.o $(OBJ)nomskymapadapter.o $(OBJ)nomspecrespadapter.o $(OBJ)nomtmatvecadapter.o $(OBJ)pawexecut.o $(OBJ)piacmd.o $(OBJ)piafitting.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piinit.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pipodrw.o $(OBJ)pisiadw.o $(OBJ)pistdimgapp.o $(OBJ)pitvmaad.o $(OBJ)servnobjm.o
+$(LIB)libPIext.a : $(OBJ)basexecut.o $(OBJ)cxxexecutor.o $(OBJ)cxxexecwin.o $(OBJ)nobjmgr.o $(OBJ)nomgadapter.o $(OBJ)nomgfdadapter.o $(OBJ)nomhistadapter.o $(OBJ)nomimagadapter.o $(OBJ)nomskymapadapter.o $(OBJ)nomspecrespadapter.o $(OBJ)nomtarradapter.o $(OBJ)nomtmatvecadapter.o $(OBJ)pawexecut.o $(OBJ)piacmd.o $(OBJ)piafitting.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piinit.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pipodrw.o $(OBJ)pisiadw.o $(OBJ)pistdimgapp.o $(OBJ)pitvmaad.o $(OBJ)servnobjm.o
 	$(AR) $(ARFLAGS)  $@ $? 
 ifeq ($(CXX),cxx)
@@ -11,5 +11,5 @@
  
 clean:
-	rm -f $(OBJ)basexecut.o $(OBJ)cxxexecutor.o $(OBJ)cxxexecwin.o $(OBJ)nobjmgr.o $(OBJ)nomgadapter.o $(OBJ)nomgfdadapter.o $(OBJ)nomhistadapter.o $(OBJ)nomimagadapter.o $(OBJ)nomskymapadapter.o $(OBJ)nomspecrespadapter.o $(OBJ)nomtmatvecadapter.o $(OBJ)pawexecut.o $(OBJ)piacmd.o $(OBJ)piafitting.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piinit.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pipodrw.o $(OBJ)pisiadw.o $(OBJ)pistdimgapp.o $(OBJ)pitvmaad.o $(OBJ)servnobjm.o
+	rm -f $(OBJ)basexecut.o $(OBJ)cxxexecutor.o $(OBJ)cxxexecwin.o $(OBJ)nobjmgr.o $(OBJ)nomgadapter.o $(OBJ)nomgfdadapter.o $(OBJ)nomhistadapter.o $(OBJ)nomimagadapter.o $(OBJ)nomskymapadapter.o $(OBJ)nomspecrespadapter.o $(OBJ)nomtarradapter.o $(OBJ)nomtmatvecadapter.o $(OBJ)pawexecut.o $(OBJ)piacmd.o $(OBJ)piafitting.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piinit.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pipodrw.o $(OBJ)pisiadw.o $(OBJ)pistdimgapp.o $(OBJ)pitvmaad.o $(OBJ)servnobjm.o
 ifeq ($(CXX),cxx)
 	cd $(REPM); rm -f *.o
@@ -103,5 +103,6 @@
  $(INC)objfio.h \
  $(INC)mutyv.h \
- $(INC)strutilxx.h nomgadapter.h \
+ $(INC)strutilxx.h \
+ $(INC)cxxcmplnk.h nomgadapter.h \
  $(INC)pidrawer.h \
  $(INC)pibwdggen.h \
@@ -614,4 +615,48 @@
  $(INC)specrespvector.h \
  $(INC)gaussfilt.h
+$(OBJ)nomtarradapter.o: nomtarradapter.cc \
+ $(INC)machdefs.h \
+ $(INC)datatype.h nomtarradapter.h \
+ nomgadapter.h $(INC)ppersist.h \
+ $(INC)pexceptions.h \
+ $(INC)gnumd5.h \
+ $(INC)anydataobj.h \
+ $(INC)pidrawer.h \
+ $(INC)pibwdggen.h \
+ $(INC)pisysdep.h \
+ $(INC)piwdgx.h \
+ $(INC)piwdggen.h \
+ $(INC)pimsghandler.h \
+ $(INC)picolist.h \
+ $(INC)picmap.h \
+ $(INC)picmapx.h \
+ $(INC)picmapgen.h \
+ $(INC)pigraphx.h \
+ $(INC)pigraphgen.h \
+ $(INC)pifontx.h \
+ $(INC)pifontgen.h \
+ $(INC)pigraphuc.h \
+ $(INC)pievthandler.h \
+ $(INC)psfile.h \
+ $(INC)parradapter.h \
+ $(INC)lut.h \
+ $(INC)ntupintf.h \
+ $(INC)generalfit.h \
+ $(INC)tvector.h \
+ $(INC)tmatrix.h \
+ $(INC)tarray.h \
+ $(INC)basarr.h \
+ $(INC)mutyv.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
+ $(INC)ndatablock.h \
+ $(INC)utilarr.h \
+ $(INC)generaldata.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)perrors.h \
+ $(INC)fmath.h \
+ $(INC)fioarr.h
 $(OBJ)nomtmatvecadapter.o: nomtmatvecadapter.cc \
  $(INC)machdefs.h \
@@ -1169,5 +1214,6 @@
  nomimagadapter.h $(INC)cimage.h \
  $(INC)fioarr.h nomtmatvecadapter.h \
- nomskymapadapter.h $(INC)pixelmap.h \
+ nomtarradapter.h nomskymapadapter.h \
+ $(INC)pixelmap.h \
  $(INC)spherepos.h \
  $(INC)unitvector.h \
Index: /trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 1315)
@@ -551,5 +551,5 @@
   return(false);
 }
-AnyDataObj * cloneobj = adap->CloneDataObj();
+AnyDataObj * cloneobj = adap->CloneDataObj(true);
 delete adap;
 if (cloneobj == NULL) {
Index: /trunk/SophyaPI/PIext/nomgadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomgadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomgadapter.cc	(revision 1315)
@@ -37,5 +37,5 @@
 
 /* --Methode-- */
-AnyDataObj* NObjMgrAdapter::CloneDataObj()
+AnyDataObj* NObjMgrAdapter::CloneDataObj(bool)
 {
 string s = typeid(*mObj).name();
Index: /trunk/SophyaPI/PIext/nomgadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomgadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomgadapter.h	(revision 1315)
@@ -33,5 +33,5 @@
 
   // Returns a new data-object, cloning the original object 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   // Copies data from object o 
Index: /trunk/SophyaPI/PIext/nomgfdadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomgfdadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomgfdadapter.cc	(revision 1315)
@@ -44,5 +44,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_GeneralFitData::CloneDataObj()
+AnyDataObj* NOMAdapter_GeneralFitData::CloneDataObj(bool /*share*/)
 {
 return( new GeneralFitData(*mG) );
Index: /trunk/SophyaPI/PIext/nomgfdadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomgfdadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomgfdadapter.h	(revision 1315)
@@ -23,5 +23,5 @@
   virtual string	   GetDataObjType();
 
-  virtual AnyDataObj*      CloneDataObj();
+  virtual AnyDataObj*      CloneDataObj(bool share=false);
 
   virtual void		   SavePPF(POutPersist& s, string const & nom);
Index: /trunk/SophyaPI/PIext/nomhistadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 1315)
@@ -47,5 +47,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_Histo::CloneDataObj()
+AnyDataObj* NOMAdapter_Histo::CloneDataObj(bool /*share*/)
 {
 mHis->UpdateHisto();  // pour le cas ou c'est un HProf
@@ -223,5 +223,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_Histo2D::CloneDataObj()
+AnyDataObj* NOMAdapter_Histo2D::CloneDataObj(bool /*share*/)
 {
 return ( new Histo2D(*mHis) );
@@ -411,5 +411,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_NTuple::CloneDataObj()
+AnyDataObj* NOMAdapter_NTuple::CloneDataObj(bool /*share*/)
 {
 return ( new NTuple(*mNt) );
@@ -476,5 +476,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_XNTuple::CloneDataObj()
+AnyDataObj* NOMAdapter_XNTuple::CloneDataObj(bool /*share*/)
 {
 return ( new XNTuple(*mNt) );
Index: /trunk/SophyaPI/PIext/nomhistadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomhistadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomhistadapter.h	(revision 1315)
@@ -27,5 +27,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
@@ -75,5 +75,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
@@ -125,5 +125,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
@@ -151,5 +151,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
Index: /trunk/SophyaPI/PIext/nomimagadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomimagadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomimagadapter.cc	(revision 1315)
@@ -59,5 +59,5 @@
 /* --Methode-- */
 template <class T>
-AnyDataObj* NOMAdapter_Image<T>::CloneDataObj()
+AnyDataObj* NOMAdapter_Image<T>::CloneDataObj(bool share)
 {
 #ifdef SANS_EVOLPLANCK
@@ -66,5 +66,5 @@
 else return ( new FitsImage<T>(*fima) );
 #else
-return( new Image<T>(*mImg ) );
+return( new Image<T>(*mImg, share) );
 #endif
 }
Index: /trunk/SophyaPI/PIext/nomimagadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomimagadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomimagadapter.h	(revision 1315)
@@ -25,5 +25,5 @@
   virtual NObjMgrAdapter*	Clone(AnyDataObj* o);
   virtual string		GetDataObjType();
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
Index: /trunk/SophyaPI/PIext/nommatvecadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nommatvecadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nommatvecadapter.cc	(revision 1315)
@@ -40,5 +40,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_Vector::CloneDataObj()
+AnyDataObj* NOMAdapter_Vector::CloneDataObj(bool /*share*/)
 {
 return ( new Vector(*mVec) );
@@ -203,5 +203,5 @@
 
 /* --Methode-- */
-AnyDataObj* NOMAdapter_Matrix::CloneDataObj()
+AnyDataObj* NOMAdapter_Matrix::CloneDataObj(bool /*share*/)
 {
 return ( new Matrix(*mMtx) );
Index: /trunk/SophyaPI/PIext/nommatvecadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nommatvecadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nommatvecadapter.h	(revision 1315)
@@ -31,5 +31,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
@@ -81,5 +81,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
Index: /trunk/SophyaPI/PIext/nomskymapadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomskymapadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomskymapadapter.cc	(revision 1315)
@@ -95,12 +95,12 @@
 /* --Methode-- */
 template <class T> 
-AnyDataObj* NOMAdapter_PixelMap<T>::CloneDataObj()
+AnyDataObj* NOMAdapter_PixelMap<T>::CloneDataObj(bool share)
 {
 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap); 
-if (lm != NULL) return( new LocalMap<T>(*lm) );
+if (lm != NULL) return( new LocalMap<T>(*lm, share) );
 SphereThetaPhi<T>* st = dynamic_cast< SphereThetaPhi<T> * >(mMap); 
-if (st != NULL) return( new SphereThetaPhi<T>(*st) );
+if (st != NULL) return( new SphereThetaPhi<T>(*st, share) );
 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap); 
-if (sg != NULL) return( new SphereHEALPix<T>(*sg) );
+if (sg != NULL) return( new SphereHEALPix<T>(*sg, share) );
 return(NULL);
 }
Index: /trunk/SophyaPI/PIext/nomskymapadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomskymapadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomskymapadapter.h	(revision 1315)
@@ -28,5 +28,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
Index: /trunk/SophyaPI/PIext/nomtarradapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomtarradapter.cc	(revision 1315)
+++ /trunk/SophyaPI/PIext/nomtarradapter.cc	(revision 1315)
@@ -0,0 +1,227 @@
+#include "machdefs.h"
+#include <stdlib.h>
+#include <typeinfo>
+#include <iostream.h>
+#include <string>
+#include <complex>
+
+#include "datatype.h"
+
+#include "nomtarradapter.h"
+
+#include "fioarr.h"
+
+
+
+//----------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TMatrix<T> 
+//----------------------------------------------------------------
+
+
+/* --Methode-- */
+template <class T> 
+NOMAdapter_TArray<T>::NOMAdapter_TArray(TArray<T>* o)
+  : NObjMgrAdapter(o)
+{
+mArr = o;
+}
+
+/* --Methode-- */
+template <class T> 
+NOMAdapter_TArray<T>::~NOMAdapter_TArray()
+{
+}
+
+/* --Methode-- */
+template <class T> 
+NObjMgrAdapter* NOMAdapter_TArray<T>::Clone(AnyDataObj* o)
+{
+TArray<T>* a = dynamic_cast<TArray<T> *>(o);
+if (a) return ( new NOMAdapter_TArray<T>(a) );
+return ( new NObjMgrAdapter(o) );
+}
+
+/* --Methode-- */
+template <class T> 
+string NOMAdapter_TArray<T>::GetDataObjType()
+{
+string type = "TArray< ";
+
+// type +=  DecodeTypeIdName(typeid(T).name());
+type += DataTypeInfo<T>::getTypeName();
+type +=  " > ";
+return(type);
+}
+
+/* --Methode-- */
+template <class T> 
+AnyDataObj* NOMAdapter_TArray<T>::CloneDataObj(bool share)
+{
+return ( new TArray<T>(*mArr, share) );
+}
+
+/* --Methode-- */
+template <class T> 
+void NOMAdapter_TArray<T>::SavePPF(POutPersist& pos, string const & nom)
+{
+FIO_TArray<T> fio(mArr);
+fio.Write(pos, nom);
+}
+
+/* --Methode-- */
+template <class T> 
+void NOMAdapter_TArray<T>::Print(ostream& os)
+{
+os << (*mArr);
+}
+
+
+/* --Methode-- */
+template <class T> 
+NTupleInterface* NOMAdapter_TArray<T>::GetNTupleInterface(bool& adel)
+{
+adel = true;
+return( new NTupInt_TArray<T>(mArr) );
+}
+
+
+
+
+// -------------------------------------------------------------
+
+/* --Methode-- */
+template <class T> 
+NTupInt_TArray<T>::NTupInt_TArray(TArray<T>* a)
+{
+mArr = a;
+}
+
+/* --Methode-- */
+template <class T> 
+NTupInt_TArray<T>::~NTupInt_TArray()
+{
+}
+
+/* --Methode-- */
+template <class T> 
+uint_4 NTupInt_TArray<T>::NbLines() const
+{
+return( mArr->Size() );
+}
+
+/* --Methode-- */
+template <class T> 
+uint_4 NTupInt_TArray<T>::NbColumns() const 
+{
+return(11);
+}
+
+/* --Methode-- */
+template <class T> 
+r_8* NTupInt_TArray<T>::GetLineD(int n) const 
+{
+if ((n < 0) || (n >= (int)(mArr->Size()) ) ) {
+  mRet[0] = n;
+  for(int i=1; i<11; i++)  mRet[i] = 0.;
+}
+else { 
+  sa_size_t ix, iy, iz, it, iu;
+  mArr->IndexAtPosition(n, ix, iy, iz, it, iu);
+  mRet[0] = n;   mRet[1] = ix;  mRet[2] = iy;  
+  mRet[3] = iz;  mRet[4] = it;  mRet[5] = iu;  
+  mRet[6] = (*mArr)(ix,iy,iz,it,iu);
+  mRet[7] = mRet[2];  mRet[8] = 0.;
+  mRet[9] = mRet[2];  mRet[10] = 0.;
+  }
+return(mRet);
+}
+
+/* --Methode-- */
+template <class T> 
+string NTupInt_TArray<T>::VarList_C(const char* nx) const 
+{
+string nomx;
+if (nx) nomx = nx;
+else nomx = "_xh_";
+string vardec = "double n,x,y,z,t,u,val,real,imag,mod,phas; \n";
+vardec += "n = " + nomx + "[0];  x = " + nomx + "[1]; y = " + nomx + "[2]; \n"; 
+vardec += "z = " + nomx + "[3];  t = " + nomx + "[4]; u = " + nomx + "[5]; \n"; 
+vardec += "val = " + nomx + "[6]; \n";
+vardec += "real = " + nomx + "[7];  imag = " + nomx + "[8]; \n";
+vardec += "mod  = " + nomx + "[9];  phas = " + nomx + "[10]; \n";
+return(vardec);
+}
+
+/* --Methode-- */
+r_8* NTupInt_TArray< complex<r_4> >::GetLineD(int n) const 
+{
+if ((n < 0) || (n >= (int)(mArr->Size()) ) ) {
+  mRet[0] = n;
+  for(int i=1; i<11; i++)  mRet[i] = 0.;
+}
+else { 
+  sa_size_t ix, iy, iz, it, iu;
+  mArr->IndexAtPosition(n, ix, iy, iz, it, iu);
+  mRet[0] = n;   mRet[1] = ix;  mRet[2] = iy;  
+  mRet[3] = iz;  mRet[4] = it;  mRet[5] = iu;  
+  mRet[7] = (*mArr)(ix,iy,iz,it,iu).real();
+  mRet[8] = (*mArr)(ix,iy,iz,it,iu).imag();
+  mRet[3] = mRet[6] = sqrt(mRet[7]*mRet[7]+mRet[8]*mRet[8]);
+  mRet[7] = atan2(mRet[8], mRet[7]);
+}
+return(mRet);
+}
+
+r_8* NTupInt_TArray< complex<r_8> >::GetLineD(int n) const 
+{
+if ((n < 0) || (n >= (int)(mArr->Size()) ) ) {
+  mRet[0] = n;
+  for(int i=1; i<11; i++)  mRet[i] = 0.;
+}
+else { 
+  sa_size_t ix, iy, iz, it, iu;
+  mArr->IndexAtPosition(n, ix, iy, iz, it, iu);
+  mRet[0] = n;   mRet[1] = ix;  mRet[2] = iy;  
+  mRet[3] = iz;  mRet[4] = it;  mRet[5] = iu;  
+  mRet[7] = (*mArr)(ix,iy,iz,it,iu).real();
+  mRet[8] = (*mArr)(ix,iy,iz,it,iu).imag();
+  mRet[3] = mRet[6] = sqrt(mRet[7]*mRet[7]+mRet[8]*mRet[8]);
+  mRet[7] = atan2(mRet[8], mRet[7]);
+}
+return(mRet);
+}
+
+
+#ifdef __CXX_PRAGMA_TEMPLATES__
+//#pragma define_template NOMAdapter_TArray<uint_2>
+//#pragma define_template NOMAdapter_TArray<int_2>
+#pragma define_template NOMAdapter_TArray<int_4>
+#pragma define_template NOMAdapter_TArray<r_4>
+#pragma define_template NOMAdapter_TArray<r_8>
+#pragma define_template NOMAdapter_TArray< complex<r_4> >
+#pragma define_template NOMAdapter_TArray< complex<r_8> >
+//#pragma define_template NTupInt_TArray<uint_2>
+//#pragma define_template NTupInt_TArray<int_2>
+#pragma define_template NTupInt_TArray<int_4>
+#pragma define_template NTupInt_TArray<r_4>
+#pragma define_template NTupInt_TArray<r_8>
+#pragma define_template NTupInt_TArray< complex<r_4> >
+#pragma define_template NTupInt_TArray< complex<r_8> >
+#endif
+
+#if defined(ANSI_TEMPLATES) 
+//template class NOMAdapter_TArray<uint_2>;
+//template class NOMAdapter_TArray<int_2>;
+template class NOMAdapter_TArray<int_4>;
+template class NOMAdapter_TArray<r_4>;
+template class NOMAdapter_TArray<r_8>;
+template class NOMAdapter_TArray< complex<r_4> >;
+template class NOMAdapter_TArray< complex<r_8> >;
+// template class NTupInt_TArray<uint_2>;
+// template class NTupInt_TArray<int_2>;
+template class NTupInt_TArray<int_4>;
+template class NTupInt_TArray<r_4>;
+template class NTupInt_TArray<r_8>;
+template class NTupInt_TArray< complex<r_4> >;
+template class NTupInt_TArray< complex<r_8> >;
+#endif
Index: /trunk/SophyaPI/PIext/nomtarradapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomtarradapter.h	(revision 1315)
+++ /trunk/SophyaPI/PIext/nomtarradapter.h	(revision 1315)
@@ -0,0 +1,66 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Adaptateur d objets (pour NamedObjMgr) 
+// pour les classes TMatrix<T>, TVector<T> de Sophya
+//                                      Reza 11/99
+//  LAL-IN2P3/CNRS               CEA-DAPNIA     
+ 
+#ifndef NOMTARRAYADAPTER_H_SEEN
+#define NOMTARRAYADAPTER_H_SEEN
+
+#include "nomgadapter.h"
+#include "tarray.h"
+
+//---------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TArray 
+//---------------------------------------------------------------
+
+template <class T> 
+class NOMAdapter_TArray : public NObjMgrAdapter {
+public:
+				NOMAdapter_TArray(TArray<T>* m = NULL);
+  virtual			~NOMAdapter_TArray();
+
+  virtual NObjMgrAdapter*	Clone(AnyDataObj* o);
+
+  virtual string		GetDataObjType();
+
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
+
+  //  virtual void			ReadFits(string const & flnm);
+  //  virtual void			SaveFits(string const & flnm);
+  virtual void			SavePPF(POutPersist& s, string const & nom);
+
+  virtual void			Print(ostream& os);
+  //  virtual PIDrawer*		GetDrawer(string& dopt);
+  //  virtual P2DArrayAdapter*	Get2DArray(string& dopt);
+  virtual NTupleInterface*	GetNTupleInterface(bool& adel);
+
+  //  virtual GeneralFitData* GetGeneralFitData(bool& adel
+  //        ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
+  //        ,double errscale=1.,double errmin=0.
+  //        ,int i1=0,int i2=-1,int j1=0,int j2=-1);
+  // virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
+  // virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
+
+protected:
+  TArray<T>* mArr;
+};
+
+// Class Interface NTuple pour TArray<T>
+
+template <class T> 
+class NTupInt_TArray : public NTupleInterface {
+public:
+			NTupInt_TArray(TArray<T>* m);
+  virtual		~NTupInt_TArray();
+  virtual uint_4        NbLines() const ;
+  virtual uint_4        NbColumns() const ;
+  virtual r_8 *         GetLineD(int n) const ;
+  virtual string        VarList_C(const char* nomx=NULL) const ;
+protected:
+  TArray<T>* mArr;
+  mutable r_8 mRet[11];
+};
+
+
+#endif
Index: /trunk/SophyaPI/PIext/nomtmatvecadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 1315)
@@ -63,10 +63,10 @@
 /* --Methode-- */
 template <class T> 
-AnyDataObj* NOMAdapter_TMatrix<T>::CloneDataObj()
+AnyDataObj* NOMAdapter_TMatrix<T>::CloneDataObj(bool share)
 {
 if (mMtx == NULL)  return(NULL);
 TVector<T>* v = dynamic_cast<TVector<T> *>(mMtx);
-if (v != NULL) return( new TVector<T>(*v, false) );
-else return ( new TMatrix<T>(*mMtx, false) );
+if (v != NULL) return( new TVector<T>(*v, share) );
+else return ( new TMatrix<T>(*mMtx, share) );
 }
 
@@ -204,4 +204,38 @@
 }
 
+// ---- Specialisation pour complexes -----
+GeneralFitData* NOMAdapter_TMatrix< complex<r_4> >::GetGeneralFitData(bool& adel
+ ,GeneralFitData::FitErrType errtype,double errscale,double errmin
+ ,int i1,int i2,int j1,int j2)
+{
+  return(NULL);
+}
+
+AnyDataObj* NOMAdapter_TMatrix< complex<r_4> >::FitResidusObj(GeneralFit& mfit)
+{
+  return(NULL);
+}
+
+AnyDataObj* NOMAdapter_TMatrix< complex<r_4> >::FitFunctionObj(GeneralFit& mfit)
+{
+  return(NULL);
+}
+
+GeneralFitData* NOMAdapter_TMatrix< complex<r_8> >::GetGeneralFitData(bool& adel
+ ,GeneralFitData::FitErrType errtype,double errscale,double errmin
+ ,int i1,int i2,int j1,int j2)
+{
+  return(NULL);
+}
+
+AnyDataObj* NOMAdapter_TMatrix< complex<r_8> >::FitResidusObj(GeneralFit& mfit)
+{
+  return(NULL);
+}
+
+AnyDataObj* NOMAdapter_TMatrix< complex<r_8> >::FitFunctionObj(GeneralFit& mfit)
+{
+  return(NULL);
+}
 
 // -------------------------------------------------------------
@@ -269,5 +303,5 @@
 
 /* --Methode-- */
-r_8* NTupInt_TMatrix< complex<float> >::GetLineD(int n) const 
+r_8* NTupInt_TMatrix< complex<r_4> >::GetLineD(int n) const 
 {
 int i,j;
@@ -286,5 +320,5 @@
 }
 
-r_8* NTupInt_TMatrix< complex<double> >::GetLineD(int n) const 
+r_8* NTupInt_TMatrix< complex<r_8> >::GetLineD(int n) const 
 {
 int i,j;
@@ -310,6 +344,6 @@
 #pragma define_template NOMAdapter_TMatrix<r_4>
 #pragma define_template NOMAdapter_TMatrix<r_8>
-//#pragma define_template NOMAdapter_TMatrix< complex<r_4> >
-//#pragma define_template NOMAdapter_TMatrix< complex<r_8> >
+#pragma define_template NOMAdapter_TMatrix< complex<r_4> >
+#pragma define_template NOMAdapter_TMatrix< complex<r_8> >
 //#pragma define_template NTupInt_TMatrix<uint_2>
 //#pragma define_template NTupInt_TMatrix<int_2>
@@ -327,6 +361,6 @@
 template class NOMAdapter_TMatrix<r_4>;
 template class NOMAdapter_TMatrix<r_8>;
-//template class NOMAdapter_TMatrix< complex<r_4> >;
-//template class NOMAdapter_TMatrix< complex<r_8> >;
+template class NOMAdapter_TMatrix< complex<r_4> >;
+template class NOMAdapter_TMatrix< complex<r_8> >;
 // template class NTupInt_TMatrix<uint_2>;
 // template class NTupInt_TMatrix<int_2>;
Index: /trunk/SophyaPI/PIext/nomtmatvecadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomtmatvecadapter.h	(revision 1314)
+++ /trunk/SophyaPI/PIext/nomtmatvecadapter.h	(revision 1315)
@@ -26,5 +26,5 @@
   virtual string		GetDataObjType();
 
-  virtual AnyDataObj*		CloneDataObj();
+  virtual AnyDataObj*		CloneDataObj(bool share=false);
 
   //  virtual void			ReadFits(string const & flnm);
Index: /trunk/SophyaPI/PIext/objlist.list
===================================================================
--- /trunk/SophyaPI/PIext/objlist.list	(revision 1314)
+++ /trunk/SophyaPI/PIext/objlist.list	(revision 1315)
@@ -9,4 +9,5 @@
 nomskymapadapter.o
 nomspecrespadapter.o
+nomtarradapter.o
 nomtmatvecadapter.o
 pawexecut.o
Index: /trunk/SophyaPI/PIext/piinit.cc
===================================================================
--- /trunk/SophyaPI/PIext/piinit.cc	(revision 1314)
+++ /trunk/SophyaPI/PIext/piinit.cc	(revision 1315)
@@ -14,4 +14,5 @@
 #include <complex>
 #include "nomtmatvecadapter.h"
+#include "nomtarradapter.h"
 #include "nomskymapadapter.h"
 #include "spherethetaphi.h"
@@ -55,4 +56,10 @@
   serv->RegisterClass(new Matrix, new NOMAdapter_Matrix );
 #else
+  serv->RegisterClass(new TArray<int_4>, new NOMAdapter_TArray<int_4> );
+  serv->RegisterClass(new TArray<r_4>, new NOMAdapter_TArray<r_4> );
+  serv->RegisterClass(new TArray<r_8>, new NOMAdapter_TArray<r_8> );
+  serv->RegisterClass(new TArray<complex<r_4> >, new NOMAdapter_TArray<complex<r_4> > );
+  serv->RegisterClass(new TArray<complex<r_8> >, new NOMAdapter_TArray<complex<r_8> > );
+
   serv->RegisterClass(new TVector<int_4>, new NOMAdapter_TMatrix<int_4> );
   serv->RegisterClass(new TMatrix<int_4>, new NOMAdapter_TMatrix<int_4> );
@@ -61,8 +68,8 @@
   serv->RegisterClass(new TVector<r_8>, new NOMAdapter_TMatrix<r_8> );
   serv->RegisterClass(new TMatrix<r_8>, new NOMAdapter_TMatrix<r_8> );
-  //CMV// serv->RegisterClass(new TVector<complex<r_4> >, new NOMAdapter_TMatrix<complex<r_4> > );
-  //CMV// serv->RegisterClass(new TMatrix<complex<r_4> >, new NOMAdapter_TMatrix<complex<r_4> > );
-  //CMV// serv->RegisterClass(new TVector<complex<r_8> >, new NOMAdapter_TMatrix<complex<r_8> > );
-  //CMV// serv->RegisterClass(new TMatrix<complex<r_8> >, new NOMAdapter_TMatrix<complex<r_8> > );
+  serv->RegisterClass(new TVector<complex<r_4> >, new NOMAdapter_TMatrix<complex<r_4> > );
+  serv->RegisterClass(new TMatrix<complex<r_4> >, new NOMAdapter_TMatrix<complex<r_4> > );
+  serv->RegisterClass(new TVector<complex<r_8> >, new NOMAdapter_TMatrix<complex<r_8> > );
+  serv->RegisterClass(new TMatrix<complex<r_8> >, new NOMAdapter_TMatrix<complex<r_8> > );
 #endif
 
