Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 312)
+++ trunk/SophyaPI/PIext/nobjmgr.cc	(revision 314)
@@ -226,5 +226,5 @@
   (myImgApp->ObjMgrW())->DelObj((*it).second.num+1000);
 }
-delete (*it).second.obj;  // destruction de l'adaptateur 
+delete (*it).second.obja;  // destruction de l'adaptateur 
 if (fgd) delete (*it).second.obj;
 myObjs->erase(it);
Index: trunk/SophyaPI/PIext/nomstladapter.cc
===================================================================
--- trunk/SophyaPI/PIext/nomstladapter.cc	(revision 314)
+++ trunk/SophyaPI/PIext/nomstladapter.cc	(revision 314)
@@ -0,0 +1,136 @@
+#include "machdefs.h"
+#include <stdlib.h>
+#include <typeinfo>
+#include <iostream.h>
+#include <string>
+
+#include "nomstladapter.h"
+#include "stlist.h"
+#include "pistlist.h"
+
+
+
+
+//-------------------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet StarList
+//-------------------------------------------------------------------------
+
+/* --Methode-- */
+NOMAdapter_StarList::NOMAdapter_StarList(StarList* o)
+  : NObjMgrAdapter(o)
+{
+mStl = o;
+}
+
+/* --Methode-- */
+NOMAdapter_StarList::~NOMAdapter_StarList()
+{
+}
+
+/* --Methode-- */
+NObjMgrAdapter* NOMAdapter_StarList::Clone(AnyDataObj* o)
+{
+StarList* stl = dynamic_cast<StarList *>(o);
+if (stl) return ( new NOMAdapter_StarList(stl) );
+return ( new NObjMgrAdapter(o) );
+}
+
+
+/* --Methode-- */
+void NOMAdapter_StarList::SavePPF(POutPersist& pos, string const & nom)
+{
+#ifdef SANS_EVOLPLANCK
+// PEIDA-EROS L'objet est lui-meme PPersist
+string tag = nom;  // A cause de const
+mStl->Write(pos,0,tag);
+#else
+string s = typeid(*mStl).name();
+cout << "NOMAdapter_StarList::SavePPF() - Error : Not supported for " << s << endl;
+#endif
+}
+
+/* --Methode-- */
+void NOMAdapter_StarList::Print(ostream& os)
+{
+os << (*mStl);
+}
+
+/* --Methode-- */
+PIDrawer* NOMAdapter_StarList::GetDrawer(string & dopt)
+{
+return(new PIStarList(mStl, false));
+}
+
+
+/* --Methode-- */
+NTupleInterface* NOMAdapter_StarList::GetNTupleInterface()
+{
+return( new NTupInt_StarList(mStl) );
+}
+
+
+// -------------------------------------------------------------
+
+/* --Methode-- */
+NTupInt_StarList::NTupInt_StarList(StarList* stl)
+{
+mStl = stl;
+}
+
+/* --Methode-- */
+NTupInt_StarList::~NTupInt_StarList()
+{
+}
+
+/* --Methode-- */
+uint_4 NTupInt_StarList::NbLines()
+{
+return(mStl->NbStars());
+}
+
+/* --Methode-- */
+uint_4 NTupInt_StarList::NbColumns()
+{
+return(11);
+}
+
+/* --Methode-- */
+r_8* NTupInt_StarList::GetLineD(int n)
+{
+BStar* bst = mStl->Star(n);
+if (bst == NULL)  
+  for(int k=0; k<11; k++)  mRet[k] = -9999.0;
+else {
+  mRet[0] = bst->PosX();
+  mRet[1] = bst->PosY();
+  mRet[2] = bst->Flux();
+  mRet[3] = bst->Fond();
+  mRet[4] = bst->PixMax();
+  mRet[5] = bst->PosXRef();
+  mRet[6] = bst->PosYRef();
+  mRet[7] = bst->FluxRef();
+  mRet[8] = bst->FondRef();
+  mRet[9] = bst->PixMaxRef();
+  mRet[10] = bst->Flags();
+  }
+return(mRet);
+}
+
+/* --Methode-- */
+string NTupInt_StarList::VarList_C(const char* nx)
+{
+string nomx;
+if (nx) nomx = nx;
+else nomx = "_xstl_";
+string vardec = "double x,y,flux,fond,pixmax; \n";
+vardec += "double xref,yref,fluxref,fondref,pixmaxref; \n";
+vardec += "double flags; \n"; 
+vardec += "x = " + nomx + "[0];  y = " + nomx + "[1]; \n";
+vardec += "flux = " + nomx + "[2];  fond = " + nomx + "[3]; \n";
+vardec += "pixmax = " + nomx + "[4]; \n";
+vardec += "xref = " + nomx + "[5];  yref = " + nomx + "[6]; \n";
+vardec += "fluxref = " + nomx + "[7];  fondref = " + nomx + "[8]; \n";
+vardec += "pixmaxref = " + nomx + "[9]; \n";
+vardec += "flags = " + nomx + "[10]; \n";
+return(vardec);
+}
Index: trunk/SophyaPI/PIext/nomstladapter.h
===================================================================
--- trunk/SophyaPI/PIext/nomstladapter.h	(revision 314)
+++ trunk/SophyaPI/PIext/nomstladapter.h	(revision 314)
@@ -0,0 +1,51 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Adaptateur d objets (pour NamedObjMgr) pour Histos/NTuple
+//                                    Reza 05/99
+//  LAL-IN2P3/CNRS               CEA-DAPNIA     
+ 
+#ifndef NOMSTLISTADAPTER_H_SEEN
+#define NOMSTLISTADAPTER_H_SEEN
+
+#include "nomgadapter.h"
+#include "stlist.h"
+
+
+//-------------------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet StarList 
+//-------------------------------------------------------------------------
+
+class NOMAdapter_StarList : public NObjMgrAdapter {
+public:
+				NOMAdapter_StarList(StarList* stl = NULL);
+  virtual			~NOMAdapter_StarList();
+
+  virtual NObjMgrAdapter*	Clone(AnyDataObj* o);
+
+  //  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 NTupleInterface*	GetNTupleInterface();
+
+protected:
+  StarList* mStl;
+};
+
+// Class Interface NTuple pour StarList 
+class NTupInt_StarList : public NTupleInterface {
+public:
+			NTupInt_StarList(StarList* stl);
+  virtual		~NTupInt_StarList();
+  virtual uint_4        NbLines();
+  virtual uint_4        NbColumns();
+  virtual r_8 *         GetLineD(int n);
+  virtual string        VarList_C(const char* nomx=NULL);
+protected:
+  StarList* mStl;
+  r_8 mRet[12];
+};
+
+
+#endif
Index: trunk/SophyaPI/PIext/piinit.cc
===================================================================
--- trunk/SophyaPI/PIext/piinit.cc	(revision 312)
+++ trunk/SophyaPI/PIext/piinit.cc	(revision 314)
@@ -7,5 +7,5 @@
 #include "nomimagadapter.h"
 #include "fitsimage.h"
-
+#include "nomstladapter.h"
 
 int PIAppInitiator::FgInit = 0;
@@ -35,4 +35,6 @@
   serv->RegisterClass(new FitsImage<int_4>, new  NOMAdapter_Image<int_4> );
   serv->RegisterClass(new FitsImage<r_4>, new  NOMAdapter_Image<r_4> );
+
+  serv->RegisterClass(new StarList, new NOMAdapter_StarList );
   
 } 
