Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 493)
+++ 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;
