Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 440)
+++ trunk/SophyaPI/PIext/nobjmgr.cc	(revision 449)
@@ -86,5 +86,4 @@
 static string* TmpDir;  // Repertoire pour les compilations / link dynamique
 
-static bool BeQuiet = false;  // Moins de messages ...
 
 // Pour completer le nom de l'objet avec le nom du repertoire
@@ -172,4 +171,11 @@
 }
 
+
+static bool verbeux = false;  // true -> plus de message (creation/suppression d'objets)
+void NamedObjMgr::SetVerbose(bool fg)
+{
+verbeux = fg;
+}
+
 /* --Methode-- */
 PIStdImgApp* NamedObjMgr::GetImgApp()
@@ -207,5 +213,5 @@
   (myImgApp->ObjMgrW())->AddDirectory(str.c_str(), myDirId);
   }
-cout << "NamedObjMgr::CreateDir() " << dirname << " Created " << endl;
+if (verbeux) cout << "NamedObjMgr::CreateDir() " << dirname << " Created " << endl;
 return(true);
 }
@@ -239,5 +245,5 @@
   (myImgApp->ObjMgrW())->DelDirectory((*it).second.id);
 myDirs->erase(it);
-cout << "NamedObjMgr::DeleteDir() " << dirname << " deleted " << endl;  
+if (verbeux) cout << "NamedObjMgr::DeleteDir() " << dirname << " deleted " << endl;  
 return(true);
 }
@@ -250,5 +256,5 @@
 if (it == myDirs->end()) return;
 (*it).second.lock = true;
-cout << "NamedObjMgr::LockDir() " << dirname << " Locked " << endl;
+if (verbeux) cout << "NamedObjMgr::LockDir() " << dirname << " Locked " << endl;
 return;
 }
@@ -261,5 +267,5 @@
 if (it == myDirs->end()) return;
 (*it).second.lock = true;
-cout << "NamedObjMgr::UnlockDir() " << dirname << " Unlocked " << endl;
+if (verbeux) cout << "NamedObjMgr::UnlockDir() " << dirname << " Unlocked " << endl;
 return;
 }
@@ -272,4 +278,5 @@
 if (it == myDirs->end()) return;
 (*it).second.keepold = keepold;
+if (!verbeux) return;
 cout << "NamedObjMgr::SetKeepOldDirAtt() " << dirname << "  ->  ";
 if ( keepold ) cout << " True " << endl;
@@ -292,5 +299,5 @@
   }
 *currDir = dirname;
-cout << "NamedObjMgr::SetCurrentDir() -> " << dirname << endl;
+if (verbeux) cout << "NamedObjMgr::SetCurrentDir() -> " << dirname << endl;
 return(true);
 }
@@ -413,7 +420,5 @@
 // Si c'est le repertoire /func, on nettoie
 if (nrep == "func")  {
-  BeQuiet = true;   
   CleanDir(nrep);
-  BeQuiet = false;
   }
 
@@ -459,5 +464,5 @@
 (*itr).second.nobj++;
 
-cout << "NamedObjMgr::AddObj()  Object " << nom << " ( "  
+if (verbeux) cout << "NamedObjMgr::AddObj()  Object " << nom << " ( "  
      << typeid(*obj).name() << " ) added (Total= " << myObjs->size() << ")" << endl;  
 return(true);
@@ -505,5 +510,6 @@
 itr = myDirs->find(r2);
 (*itr).second.nobj++;
-cout << "NamedObjMgr::RenameObj() - Object " << nom << " renamed to " << nomnew << endl;
+if (verbeux) 
+  cout << "NamedObjMgr::RenameObj() - Object " << nom << " renamed to " << nomnew << endl;
 return(true);
 }
@@ -534,5 +540,5 @@
 (*itr).second.nobj--;
 
-if (BeQuiet) return(true);  
+if (!verbeux) return(true);  
 if (fgd) cout << "NamedObjMgr::DelObj()  Object " << nom << " deleted (Total= " << myObjs->size() << ")" << endl;
 else  cout << "NamedObjMgr::DelObj()  Object " << nom << " removed (Total= " << myObjs->size() << ")" << endl;
@@ -686,4 +692,5 @@
 string nom;
 
+int nread = 0;
 if ( (s.NbTags() < 1) || (num >= s.NbTags()) ) {
   if (num >= 0) { 
@@ -701,4 +708,5 @@
   nom = "";
   AddObj(obj->DataObj(), nom);
+  nread++;
 }
  
@@ -717,7 +725,8 @@
     ok = false; 
   } ENDTRY;
-  if (ok)  AddObj(obj->DataObj(), nom, true);  
-}
-
+  if (ok)  { AddObj(obj->DataObj(), nom, true);  nread++; }
+}
+
+cout << "NamedObjMgr::ReadObj(...) " << nread << " Objects read " << endl;
 return;
 }
@@ -919,5 +928,5 @@
 obja = GetObjAdapter(nom);
 if (obja == NULL) {
-  cout << "NamedObjMgr::DisplayImage() Error , Pas d'objet de nom " << nom << endl; 
+  cout << "NamedObjMgr::DisplayImage() Error , No such object " << nom << endl; 
   return;
 }
@@ -928,5 +937,5 @@
 if (!arr) { 
   string ctyp = typeid(*(obja->GetDataObj())).name();
-  cout << "NamedObjMgr::DisplayImage() Error , Non supporte pour " << ctyp << endl; 
+  cout << "NamedObjMgr::DisplayImage() Error , Not supported for " << ctyp << endl; 
   return;
   }
@@ -954,5 +963,5 @@
 obja = GetObjAdapter(nom);
 if (obja == NULL) {
-  cout << "NamedObjMgr::DisplayImage() Error , Pas d'objet de nom " << nom << endl; 
+  cout << "NamedObjMgr::DisplaySurf3D() Error , No such object " << nom << endl; 
   return;
 }
@@ -963,5 +972,5 @@
 if (!arr) { 
   string ctyp = typeid(*(obja->GetDataObj())).name();
-  cout << "NamedObjMgr::DisplaySurf3D() Error , Non supporte pour " << ctyp << endl; 
+  cout << "NamedObjMgr::DisplaySurf3D() Error , Not supported " << ctyp << endl; 
   return;
   }
@@ -969,5 +978,5 @@
 if ((arr->XSize() > 250) || (arr->YSize() > 250)) {
   cout << "NamedObjMgr::DisplaySurf3D() Error , 2D-Array(" <<  arr->XSize() 
-       << "x" << arr->YSize() << ") trop grand (max=250x250)" << endl; 
+       << "x" << arr->YSize() << ") too big (max=250x250)" << endl; 
   delete arr;
   return;
@@ -998,5 +1007,5 @@
 AnyDataObj* obj=GetObj(nom);
 if (obj == NULL) {
-  cout << "NamedObjMgr::DisplayNT() Error , Pas d'objet de nom " << nom << endl; 
+  cout << "NamedObjMgr::DisplayNT() Error , No such object " << nom << endl; 
   return;
 }
@@ -1007,5 +1016,5 @@
 // if (typeid(*obj) != typeid(NTupleInterface)) { 
   string ctyp = typeid(*obj).name();
-  cout << "NamedObjMgr::DisplayNT() Error , Objet n'est pas un NTuple " << ctyp << endl; 
+  cout << "NamedObjMgr::DisplayNT() Error , Object not an NTuple " << ctyp << endl; 
   return;
   }
@@ -1061,10 +1070,10 @@
 AnyDataObj* obj=GetObj(nom);
 if(obj == NULL)
-  {cout << "NamedObjMgr::DisplayGFD() Error , Pas d'objet de nom " << nom << endl; 
+  {cout << "NamedObjMgr::DisplayGFD() Error , No such object " << nom << endl; 
    return;}
 if(!myImgApp) return; 
 if(typeid(*obj) != typeid(GeneralFitData))
   {string ctyp = typeid(*obj).name();
-   cout<<"NamedObjMgr::DisplayGFD() Error , Objet n'est pas un GeneralFitData "<<ctyp<<endl; 
+   cout<<"NamedObjMgr::DisplayGFD() Error , Object not a GeneralFitData "<<ctyp<<endl; 
    return;}
 
