Index: trunk/SophyaLib/NTools/dvlist.cc
===================================================================
--- trunk/SophyaLib/NTools/dvlist.cc	(revision 277)
+++ trunk/SophyaLib/NTools/dvlist.cc	(revision 278)
@@ -39,4 +39,6 @@
 
 
+using namespace PlanckDPC;
+
 char MuTyV::myStrBuf[64];   // Declare static ds le .h 
 
@@ -74,5 +76,6 @@
 {
 PInPersist s(flnm);
-Read(s);
+ObjFileIO<DVList> fiodvl(this);
+fiodvl.Read(s);
 }
 
@@ -279,90 +282,7 @@
 }
 
-
-/* --Methode-- */
-void        DVList::WriteSelf(POutPersist& s) const
-{
-char buf[320];
-
-int lc = comment.length();
-if (lc > 319) lc = 319;
-if (lc > 0) {
-  sprintf(buf,"Comment: ( %6d ) ", lc); 
-  s.PutLine(buf);
-  s.PutBytes(comment.c_str(), lc);
-  }
-s.PutLine("----Variable-List---------------");
-ValList::const_iterator it;
-for(it = mvlist.begin(); it != mvlist.end(); it++)  {
-  switch ((*it).second.typ) 
-    {
-    case 'I' :
-      sprintf(buf,"I %s %d", (*it).first.substr(0,64).c_str(), (*it).second.mtv.iv );
-      s.PutLine(buf); 
-      break;
-    case 'D' : 
-      sprintf(buf,"D %s %.20g", (*it).first.substr(0,64).c_str(), (*it).second.mtv.dv );
-      s.PutLine(buf); 
-      break;
-    case 'S' : 
-      sprintf(buf,"S %s %s", (*it).first.substr(0,64).c_str(), (*it).second.mtv.strv );
-      s.PutLine(buf); 
-      break;
-    default :
-      break;
-    }
-  }
-
-s.PutLine("ZZZZZ--End-of-Varible-List------");
-}
-
-/* --Methode-- */
-void        DVList::ReadSelf(PInPersist& s)
-{
-char buf[320];
-int_4 j,iv;
-double dv;
-bool ok=true;
-buf[0] = '\0';
-Clear();
-
-s.GetLine(buf, 319);  // Pour lire les "------- "
-if (buf[0] != '-') {  // Il y a un champ commentaire a lire 
-  buf[18] ='\0';
-  int lc = atoi(buf+11);
-  if (lc > 319)  { 
-    cerr << "DVList::ReadSelf() Pb/Bug ??  CommentLength= " << lc << endl;
-    lc = 319;
-    }
-  s.GetBytes(buf, lc);
-  buf[lc] ='\0';
-  comment = buf;
-  }
-
-while(ok) {
-  s.GetLine(buf, 319);
-  buf[319] = '\0';
-  if (strncmp(buf,"ZZZZZ",5) == 0)  { ok=false; break; }
-  j = posc(buf+2, ' ')+2;
-  buf[j] = '\0';
-  switch (buf[0])
-    {
-    case 'I' :
-      iv = (int_4)atol(buf+j+1);
-      SetI(buf+2, iv);
-      break;
-    case 'D' :
-      dv = atof(buf+j+1);
-      SetD(buf+2, dv);
-      break;
-    case 'S' :
-      SetS(buf+2, buf+j+1);
-      break;
-    default :
-      break;
-    }
-  } 
-
-}
+// Classe pour la gestion de persistance
+// ObjFileIO<DVList>
+
 
 //++
@@ -397,2 +317,97 @@
 //|	int m =  dvlr["hello"] ;   //  m = 88
 //--
+
+
+
+/* --Methode-- */
+void        ObjFileIO<DVList>::WriteSelf(POutPersist& s) const
+{
+char buf[320];
+
+int lc = dobj->Comment().length();
+if (lc > 319) lc = 319;
+if (lc > 0) {
+  sprintf(buf,"Comment: ( %6d ) ", lc); 
+  s.PutLine(buf);
+  s.PutBytes(dobj->Comment().c_str(), lc);
+  }
+s.PutLine("----Variable-List---------------");
+DVList::ValList::const_iterator it;
+for(it = dobj->Begin(); it != dobj->End(); it++)  {
+  switch ((*it).second.typ) 
+    {
+    case 'I' :
+      sprintf(buf,"I %s %d", (*it).first.substr(0,64).c_str(), (*it).second.mtv.iv );
+      s.PutLine(buf); 
+      break;
+    case 'D' : 
+      sprintf(buf,"D %s %.20g", (*it).first.substr(0,64).c_str(), (*it).second.mtv.dv );
+      s.PutLine(buf); 
+      break;
+    case 'S' : 
+      sprintf(buf,"S %s %s", (*it).first.substr(0,64).c_str(), (*it).second.mtv.strv );
+      s.PutLine(buf); 
+      break;
+    default :
+      break;
+    }
+  }
+
+s.PutLine("ZZZZZ--End-of-Varible-List------");
+}
+
+/* --Methode-- */
+void        ObjFileIO<DVList>::ReadSelf(PInPersist& s)
+{
+char buf[320];
+int_4 j,iv;
+double dv;
+bool ok=true;
+buf[0] = '\0';
+dobj->Clear();
+
+s.GetLine(buf, 319);  // Pour lire les "------- "
+if (buf[0] != '-') {  // Il y a un champ commentaire a lire 
+  buf[18] ='\0';
+  int lc = atoi(buf+11);
+  if (lc > 319)  { 
+    cerr << "DVList::ReadSelf() Pb/Bug ??  CommentLength= " << lc << endl;
+    lc = 319;
+    }
+  s.GetBytes(buf, lc);
+  buf[lc] ='\0';
+  dobj->Comment() = buf;
+  }
+
+while(ok) {
+  s.GetLine(buf, 319);
+  buf[319] = '\0';
+  if (strncmp(buf,"ZZZZZ",5) == 0)  { ok=false; break; }
+  j = posc(buf+2, ' ')+2;
+  buf[j] = '\0';
+  switch (buf[0])
+    {
+    case 'I' :
+      iv = (int_4)atol(buf+j+1);
+      dobj->SetI(buf+2, iv);
+      break;
+    case 'D' :
+      dv = atof(buf+j+1);
+      dobj->SetD(buf+2, dv);
+      break;
+    case 'S' :
+      dobj->SetS(buf+2, buf+j+1);
+      break;
+    default :
+      break;
+    }
+  } 
+}
+
+#ifdef __CXX_PRAGMA_TEMPLATES__
+#pragma define_template ObjFileIO<DVList>
+#endif
+
+#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
+template class ObjFileIO<DVList>;
+#endif
Index: trunk/SophyaLib/NTools/dvlist.h
===================================================================
--- trunk/SophyaLib/NTools/dvlist.h	(revision 277)
+++ trunk/SophyaLib/NTools/dvlist.h	(revision 278)
@@ -6,5 +6,5 @@
 #define DVLIST_H_SEEN
 
-#include "ppersist.h"
+#include "objfio.h"
 
 #include <stdio.h>
@@ -21,4 +21,6 @@
 #include <map.h>
 #endif
+
+namespace PlanckDPC {
 
 // Classe utilitaire pour manipuler des variables typees 
@@ -66,7 +68,7 @@
 //  Classe liste de variables  Dynamic Variable List  
 
-class DVList : public PPersist {
+class DVList : public AnyDataObj {
 public:
-  enum {classId = ClassId_DVList };
+//  enum {classId = ClassId_DVList };
 
                     DVList();
@@ -97,13 +99,16 @@
   inline void       Print() const  { Print(cout); }  
   virtual void      Print(ostream& os)  const;
+
+  typedef map<string, MuTyV, less<string> >  ValList; 
+  inline ValList::const_iterator Begin() { return(mvlist.begin()); } 
+  inline ValList::const_iterator End() { return(mvlist.end()); } 
   
-  int_4             ClassId() const        { return classId; }
-  static PPersist*  Create()               { return new DVList;}
+//  int_4             ClassId() const        { return classId; }
+//  static PPersist*  Create()               { return new DVList;}
 
-  virtual void      WriteSelf(POutPersist&) const;
-  virtual void      ReadSelf(PInPersist&);
+//  virtual void      WriteSelf(POutPersist&) const;
+//  virtual void      ReadSelf(PInPersist&);
 
 private:
-  typedef map<string, MuTyV, less<string> >  ValList; 
   
   ValList mvlist;
@@ -114,4 +119,14 @@
   {  dvl.Print(s);  return(s);  }
 
+inline POutPersist& operator << (POutPersist& os, DVList & obj)
+{ ObjFileIO<DVList> fio(&obj);  fio.Write(os);  return(os); }
+inline PInPersist& operator >> (PInPersist& is, DVList & obj)
+{ ObjFileIO<DVList> fio(&obj);  fio.Read(is);  return(is); }
+
+// Classe pour la gestion de persistance
+// ObjFileIO<DVList>
+
+} // namespace PlanckDPC
+
 #endif /* DVLIST_H__SEEN */
 
Index: trunk/SophyaLib/NTools/ntuple.cc
===================================================================
--- trunk/SophyaLib/NTools/ntuple.cc	(revision 277)
+++ trunk/SophyaLib/NTools/ntuple.cc	(revision 278)
@@ -311,5 +311,5 @@
 s.PutI4(mBlk);
 s.PutI4(mNBlk);
-if (mInfo)  mInfo->Write(s);
+if (mInfo)  s << (*mInfo);
 int jb;
 for(jb=0; jb<mNBlk; jb++)
@@ -344,5 +344,5 @@
 if (hadinfo) {    // Lecture eventuelle du DVList Info
   if (mInfo == NULL)  mInfo = new DVList;
-  mInfo->Read(s);
+  s >> (*mInfo);
   }
 
Index: trunk/SophyaLib/NTools/outilsinit.cc
===================================================================
--- trunk/SophyaLib/NTools/outilsinit.cc	(revision 277)
+++ trunk/SophyaLib/NTools/outilsinit.cc	(revision 278)
@@ -34,5 +34,5 @@
   PPRegister(Poly);
   PPRegister(Poly2);
-  PPRegister(DVList);
+  PPRegister(ObjFileIO<DVList>);
   PPRegister(Histo);
   PPRegister(Histo2D);
Index: trunk/SophyaLib/NTools/rzimage.cc
===================================================================
--- trunk/SophyaLib/NTools/rzimage.cc	(revision 277)
+++ trunk/SophyaLib/NTools/rzimage.cc	(revision 278)
@@ -5,5 +5,5 @@
 // LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
 
-//  $Id: rzimage.cc,v 1.3 1999-04-27 15:03:02 ansari Exp $
+//  $Id: rzimage.cc,v 1.4 1999-04-28 13:36:50 ansari Exp $
 
 #include "machdefs.h"
@@ -602,5 +602,5 @@
 } 
 
-if (mInfo) mInfo->Write(s);
+if (mInfo) s << (*mInfo);
 return;
 }
@@ -667,5 +667,5 @@
 if (itab[3])  // has info
   { if (mInfo == NULL)  mInfo = new DVList;
-  mInfo->Read(s); }
+  s >> (*mInfo); }
 
 return;
