Index: /trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- /trunk/SophyaPI/PIext/basexecut.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/basexecut.cc	(revision 495)
@@ -22,5 +22,5 @@
 #include "cvector.h"
 
-
+using namespace PlanckDPC;
 
 /* --Methode-- */
@@ -118,6 +118,6 @@
     cout << endl; 
     cerr << endl;
-    string es = PeidaExc(merr);
-    cerr << "PIABaseExecutor: Call UserFunc  Exception :" << merr << es;
+//CMV_A_FAIRE    string es = PeidaExc(merr);
+//CMV_A_FAIRE    cerr << "PIABaseExecutor: Call UserFunc  Exception :" << merr << es;
     }
   mImgApp->RedirectStdOutErr(red);
Index: /trunk/SophyaPI/PIext/exclude
===================================================================
--- /trunk/SophyaPI/PIext/exclude	(revision 494)
+++ /trunk/SophyaPI/PIext/exclude	(revision 495)
@@ -1,2 +1,4 @@
 modrecst.cc
 userfitfunex.c
+nomstladapter.cc
+pistlist.cc
Index: /trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 495)
@@ -684,18 +684,27 @@
 void NamedObjMgr::ReadObj(string const & flnm, string & nobj)
 {
-PPersist* obj=NULL;
+PPersist* ppobj=NULL;
 bool ok = true;
-
+#ifdef SANS_EVOLPLANCK
 TRY{
   PInPersist pis(flnm);
-  obj = PPersistMgr::ReadObject(pis);
-  if (obj == NULL) ok = false;
+  ppobj = PPersistMgr::ReadObject(pis);
+  if (ppobj == NULL) ok = false;
 }  CATCH(merr) 
   { printf("NamedObjMgr::ReadObj()/Error Exception= %ld (%s) \n", 
     (long)merr, PeidaExc(merr));  ok = false; } ENDTRY;
-
+#else
+try {
+  PInPersist pis(flnm);
+  ppobj = pis.ReadObject();
+  }
+catch (IOExc iox) {
+  cerr << "NamedObjMgr::ReadObj()/Error Exception - Msg= " << iox.Msg() << endl;
+  ok = false;
+  }
+#endif
 if (!ok)  return;
 if (nobj.length()<1)  nobj = servnobjm->FileName2Name(flnm);
-AddObj(obj->DataObj(), nobj, true);
+AddObj(ppobj->DataObj(), nobj, true);
 return;
 }
@@ -713,7 +722,10 @@
 if ( (s.NbTags() < 1) || (num >= s.NbTags()) ) {
   if (num >= 0) { 
-    printf("NamedObjMgr::ReadObj(PInPersist, %d) Error! NbTags = %d \n", num, s.NbTags());
+    cerr << "NamedObjMgr::ReadObj(PInPersist, " << num << "  Error! NbTags =" 
+         << s.NbTags() << endl;
     return;
   }
+
+#ifdef SANS_EVOLPLANCK
   TRY {
     obj = PPersistMgr::ReadObject(s);
@@ -723,4 +735,14 @@
     ok = false; 
   } ENDTRY;
+#else
+try {
+  obj = s.ReadObject();
+  }
+catch (IOExc iox) {
+  cerr << "NamedObjMgr::ReadObj()/Error Exception - Msg= " << iox.Msg() << endl;
+  ok = false;
+  }
+#endif
+
   if (!ok)  return;
   nom = "";
@@ -732,4 +754,5 @@
 else { n0 = num; n1 = num+1; }
 for(i=n0; i<n1; i++) {
+#ifdef SANS_EVOLPLANCK
   key = s.TagKey(i, cid, ln); 
   if (ln <= 0)  nom = "";
@@ -743,4 +766,17 @@
     ok = false; 
   } ENDTRY;
+#else
+  s.GotoTagNum(i);
+  try {
+    obj = s.ReadObject();
+    char buffnom[64];
+    sprintf(buffnom,"O%d",i);
+    nom = buffnom;
+  }
+  catch (IOExc iox) {
+    cerr << "NamedObjMgr::ReadObj()/Error Exception - Msg= " << iox.Msg() << endl;
+    ok = false;
+    }
+#endif
   if (ok)  { AddObj(obj->DataObj(), nom, true);  nread++; }
 }
@@ -756,4 +792,5 @@
 
 PInPersist* ppin;
+#ifdef SANS_EVOLPLANCK
 TRY{
   ppin = new PInPersist(flnm);
@@ -763,5 +800,15 @@
   { printf("NamedObjMgr::ReadAll()/Error Exception= %ld (%s) \n", 
     (long)merr, PeidaExc(merr));  ok = false; } ENDTRY;
-
+#else
+try {
+  ppin = new PInPersist(flnm);
+  if (ppin->NbTags() < 1)  obj = ppin->ReadObject();
+  else   obj = NULL; 
+}
+catch (IOExc iox) {
+    cerr << "NamedObjMgr::ReadAll()/Error Exception - Msg= " << iox.Msg() << endl;
+    ok = false;
+}
+#endif
 if (!ok)  return;
 if (obj) {
@@ -784,12 +831,8 @@
 #endif
 
-TRY{
 //  obj = RzReadFits((char*)flnm.c_str(), ImgOffX, ImgOffY, ImgSizX, ImgSizY, ImgBitSgn);
 #ifdef SANS_EVOLPLANCK 
+TRY{
   obj = RzReadFits((char*)flnm.c_str());
-#else
-  printf("NamedObjMgr::ReadFITS( NON-Disponible EVOL-PLANCK) \n"); 
-  obj = NULL;
-#endif
   if (obj == NULL)   ok = false;
 }  CATCH(merr) { 
@@ -801,4 +844,7 @@
   AddObj((AnyDataObj*)obj, nobj);
 }
+#else
+  printf("NamedObjMgr::ReadFITS( NON-Disponible EVOL-PLANCK) \n"); 
+#endif
 return;
 }
@@ -834,4 +880,5 @@
 bool ok = true;
 POutPersist* pout;
+#ifdef SANS_EVOLPLANCK 
 TRY{
   pout = new POutPersist(flnm);
@@ -839,4 +886,13 @@
   { printf("NamedObjMgr::SaveObjects()/Error Exception= %ld (%s) \n", 
     (long)merr, PeidaExc(merr));  ok = false; } ENDTRY;
+#else
+try {
+ pout = new POutPersist(flnm);
+}
+catch (IOExc iox) {
+    cerr << "NamedObjMgr::SaveObjects()/Error Exception - Msg= " << iox.Msg() << endl;
+    ok = false;
+}
+#endif
 if (!ok)  return;
 NObjList::iterator it;
@@ -857,4 +913,5 @@
 
 POutPersist* pout;
+#ifdef SANS_EVOLPLANCK 
 TRY{
   pout = new POutPersist(flnm);
@@ -862,4 +919,13 @@
   { printf("NamedObjMgr::SaveAll()/Error Exception= %ld (%s) \n", 
     (long)merr, PeidaExc(merr));  ok = false; } ENDTRY;
+#else
+try {
+ pout = new POutPersist(flnm);
+}
+catch (IOExc iox) {
+    cerr << "NamedObjMgr::SaveAll()/Error Exception - Msg= " << iox.Msg() << endl;
+    ok = false;
+}
+#endif
 if (!ok)  return;
 NObjList::iterator it;
Index: /trunk/SophyaPI/PIext/nobjmgr.h
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.h	(revision 494)
+++ /trunk/SophyaPI/PIext/nobjmgr.h	(revision 495)
@@ -9,4 +9,5 @@
 #include "machdefs.h"
 #include "anydataobj.h"
+#include "ppersist.h"
 #include "dlftypes.h"
 
Index: /trunk/SophyaPI/PIext/nomhistadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 495)
@@ -315,4 +315,5 @@
 }
 
+#ifdef SANS_EVOLPLANCK
 //-------------------------------------------------------------------------
 // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet XNTuple
@@ -368,3 +369,4 @@
 }
 
-
+#endif  // SANS_EVOLPLANCK
+
Index: /trunk/SophyaPI/PIext/nomhistadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomhistadapter.h	(revision 494)
+++ /trunk/SophyaPI/PIext/nomhistadapter.h	(revision 495)
@@ -12,5 +12,8 @@
 #include "hisprof.h"
 #include "ntuple.h"
+
+#ifdef SANS_EVOLPLANCK
 #include "xntuple.h"
+#endif
 
 //-------------------------------------------------------------------------
@@ -115,4 +118,5 @@
 };
 
+#ifdef SANS_EVOLPLANCK
 //-------------------------------------------------------------------------
 // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet XNTuple 
@@ -137,4 +141,5 @@
 };
 
+#endif  // SANS_EVOLPLANCK
 
 
Index: /trunk/SophyaPI/PIext/nomimagadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomimagadapter.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/nomimagadapter.cc	(revision 495)
@@ -6,5 +6,7 @@
 
 #include "nomimagadapter.h"
+#ifdef SANS_EVOLPLANCK
 #include "fitsimage.h"
+#endif
 #include "pimgadapter.h"
 
@@ -42,7 +44,11 @@
 AnyDataObj* NOMAdapter_Image<T>::GetCopyObj()
 {
+#ifdef SANS_EVOLPLANCK
 FitsImage<T> * fima = dynamic_cast<FitsImage<T> *>(mImg);
 if (fima == NULL)   return( new Image<T>(*mImg ) );
 else return ( new FitsImage<T>(*fima) );
+#else
+return( new Image<T>(*mImg ) );
+#endif
 }
 
@@ -55,4 +61,5 @@
 fim.Save(flnm);
 #else
+string s = typeid(*mImg).name();
 cout << "NOMAdapter_Image<T>::SaveFits() - Error : Not supported for " << s << endl;
 #endif
Index: /trunk/SophyaPI/PIext/piafitting.cc
===================================================================
--- /trunk/SophyaPI/PIext/piafitting.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/piafitting.cc	(revision 495)
@@ -1248,5 +1248,10 @@
 , saveI1(0), saveI2(0), saveJ1(0), saveJ2(0), ErrValue(1.)
 {
+#ifdef SANS_EVOLPLANCK
 COMPATIBLE_ASSERT(mFitter);
+#else
+ASSERT(mFitter);
+#endif
+
 int npar = mFitter->mNPar;
 
Index: /trunk/SophyaPI/PIext/piafitting.h
===================================================================
--- /trunk/SophyaPI/PIext/piafitting.h	(revision 494)
+++ /trunk/SophyaPI/PIext/piafitting.h	(revision 495)
@@ -20,11 +20,17 @@
 class PIStdImgApp;
 class PIAFitterWind;
+class Matrix; 
+class RzImage; //CMV_A_FAIRE class RzImage;
+
+#ifdef SANS_EVOLPLANCK
 class GeneralFunction; class GeneralFunc; class GeneralFit;
 class GeneralFitData;
-class Histo; class Matrix; class Histo2D;
-#ifdef SANS_EVOLPLANCK
-class RzImage;
+class Histo;  class Histo2D;
 #else
-//CMV_A_FAIRE class RzImage;
+namespace PlanckDPC { 
+class GeneralFunction; class GeneralFunc; class GeneralFit;
+class GeneralFitData;
+class Histo; class Histo2D;
+}
 #endif
 
@@ -94,9 +100,5 @@
 Vector* mV; Histo* mH; // Do not delete
 Matrix* mM; Histo2D* mH2; // Do not delete
-#ifdef SANS_EVOLPLANCK
 RzImage* mIm; // Do not delete
-#else
-//CMV_A_FAIRE RzImage* mIm; // Do not delete
-#endif
 GeneralFitData* mG; // Do not delete
 // Gestion des fonctions de fit predefinies
Index: /trunk/SophyaPI/PIext/piinit.cc
===================================================================
--- /trunk/SophyaPI/PIext/piinit.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/piinit.cc	(revision 495)
@@ -7,6 +7,9 @@
 #include "nommatvecadapter.h"
 #include "nomimagadapter.h"
+
+#ifdef SANS_EVOLPLANCK
 #include "fitsimage.h"
 #include "nomstladapter.h"
+#endif
 
 int PIAppInitiator::FgInit = 0;
@@ -24,8 +27,10 @@
   serv->RegisterClass(new Histo2D, new NOMAdapter_Histo2D );
   serv->RegisterClass(new NTuple, new NOMAdapter_NTuple );
+#ifdef SANS_EVOLPLANCK
   serv->RegisterClass(new XNTuple, new NOMAdapter_XNTuple );
   char* varenv=NULL;
   if ( (varenv=getenv("PEIDA_TMP")) == NULL )   varenv=getenv("TMPDIR") ;
   if (varenv)  XNTuple::SetSwapPath(varenv);
+#endif
 
   serv->RegisterClass(new GeneralFitData, new NOMAdapter_GeneralFitData );
@@ -39,4 +44,5 @@
   serv->RegisterClass(new Image<r_4>, new  NOMAdapter_Image<r_4> );
  
+#ifdef SANS_EVOLPLANCK
   serv->RegisterClass(new FitsImage<uint_2>, new  NOMAdapter_Image<uint_2> );
   serv->RegisterClass(new FitsImage<int_2>, new  NOMAdapter_Image<int_2> );
@@ -45,4 +51,5 @@
 
   serv->RegisterClass(new StarList, new NOMAdapter_StarList );
+#endif
 
 }
Index: /trunk/SophyaPI/PIext/pipodrw.h
===================================================================
--- /trunk/SophyaPI/PIext/pipodrw.h	(revision 494)
+++ /trunk/SophyaPI/PIext/pipodrw.h	(revision 495)
@@ -7,4 +7,5 @@
 #define PIPODRW_H_SEEN
 
+#include "machdefs.h"
 #include "pidrawer.h"
 #include "parradapter.h"
@@ -13,6 +14,10 @@
 #include "histos2.h"
 
+#ifdef SANS_EVOLPLANCK
+class GeneralFunction;
+#else
+namespace PlanckDPC {class GeneralFunction;} 
+#endif
 
-class GeneralFunction;
 class PIGFFDrawer : public PIDrawer {
 public:
Index: /trunk/SophyaPI/PIext/pisiadw.cc
===================================================================
--- /trunk/SophyaPI/PIext/pisiadw.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/pisiadw.cc	(revision 495)
@@ -205,5 +205,5 @@
 
 bool ok = true;
-
+#ifdef SANS_EVOLPLANCK
 TRY {
   mPin = new PInPersist(flnm);
@@ -220,5 +220,5 @@
   return;
 }
-
+#endif
 if (objlist)  delete objlist;
 SetSize(ttx,tty);
@@ -229,4 +229,5 @@
 
 
+#ifdef SANS_EVOLPLANCK
 for(i=0; i<mPin->NbTags(); i++) {
   key = mPin->TagKey(i, cid, ln);  // $CHECK$ non-const & reference initialized to temporary, car int -> long&
@@ -237,4 +238,5 @@
   objlist->AppendItem(strg, 5000+i);
 }
+#endif
 
 }
Index: /trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- /trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 495)
@@ -330,4 +330,5 @@
   mCons->AddStr(s2.c_str(), PIVA_Blue, true);
   SetBusy();
+#ifdef SANS_EVOLPLANCK
   TRY {
     mCmd->Interpret(s);
@@ -337,7 +338,17 @@
     cerr << endl;
     string es = PeidaExc(merr);
-    cerr << "PIStdImgApp::Process()/ Cmd->Do() Exception :" << es << " (" << merr << ")" << endl ;    
-  }
-
+    cerr << "PIStdImgApp::Process()/ Cmd->Do() Exception :" << es << " (" << merr << ")" << endl ;
+    }
+#else
+  try {
+    mCmd->Interpret(s);
+    }  
+  catch ( PException exc ) {
+    fflush(stdout); 
+    cout << endl; 
+    cerr << endl;
+    cerr << "PIStdImgApp::Process()/ Cmd->Interpret()  Exception :" << exc.Msg() << endl;
+  }
+#endif
   SetReady();
   }
Index: /trunk/SophyaPI/PIext/servnobjm.cc
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.cc	(revision 494)
+++ /trunk/SophyaPI/PIext/servnobjm.cc	(revision 495)
@@ -23,5 +23,4 @@
 #include "ntuple.h"
 #include "cimage.h"
-#include "fitsimage.h"
 
 #include "histos.h"
@@ -62,6 +61,10 @@
 ObjAdaptList::iterator it;
 for(it = objadaplist.begin(); it != objadaplist.end(); it++) 
+#ifdef SANS_EVOLPLANCK
     if (typeid(*o) == typeid(*((*it).obj)))  THROW(dupIdErr);
-
+#else
+    if (typeid(*o) == typeid(*((*it).obj)))  
+     throw(DuplicateIdExc("Services2NObjMgr::RegisterClass() - Duplicate class"));
+#endif
 dataobj_adapter oba;
 oba.obj = o;
@@ -182,4 +185,5 @@
 double xx;
 double dx = (xmax-xmin)/np;
+#ifdef SANS_EVOLPLANCK
 TRY {
   for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
@@ -193,5 +197,17 @@
   vpy = NULL;
   } ENDTRY;
-
+#else
+try {
+  for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
+}
+catch ( PException exc ) {
+  fflush(stdout); 
+  cout << endl; 
+  cerr << endl;
+  cerr << "Services2NObjMgr::PlotFunc()  Exception :"  << exc.Msg() << endl; 
+  delete vpy;
+  vpy = NULL;
+}
+#endif
 
 if (vpy) {
@@ -240,4 +256,5 @@
 double dy = (ymax-ymin)/npy;
 // printf(" -- DBG -- %d %d , %g %g , %g %g \n", npx, npy, xmin, xmax, ymin, ymax);
+#ifdef SANS_EVOLPLANCK
 TRY {
   for(j=0; j<npy; j++) {
@@ -256,4 +273,22 @@
   delete mtx;  mtx = NULL;
   } ENDTRY;
+#else
+try {
+  for(j=0; j<npy; j++) {
+    yy = ymin+dy*j; 
+    for(i=0; i<npx; i++) {
+      xx = xmin+dx*i;
+      (*mtx)(j, i) = f(xx, yy);
+    }
+  }
+}
+catch ( PException exc ) {
+  fflush(stdout); 
+  cout << endl; 
+  cerr << endl;
+  cerr << "Services2NObjMgr::PlotFunc2D()  Exception :"  << exc.Msg() << endl; 
+  delete mtx;  mtx = NULL;
+}
+#endif
 
 if (mtx) {
Index: /trunk/SophyaPI/PIext/servnobjm.h
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.h	(revision 494)
+++ /trunk/SophyaPI/PIext/servnobjm.h	(revision 495)
@@ -17,8 +17,18 @@
 #include "anydataobj.h"
 
+#ifdef SANS_EVOLPLANCK
 class NTuple;
 class Histo;
 class Histo2D;
 class HProf;
+#else
+namespace PlanckDPC { 
+class NTuple;
+class Histo;
+class Histo2D;
+class HProf;
+}
+#endif
+
 class NamedObjMgr;
 class PIStdImgApp;
