Index: /trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- /trunk/SophyaPI/PIext/basexecut.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/basexecut.cc	(revision 2999)
@@ -444,5 +444,5 @@
   }
   
-  mObjMgr->SetVar(tokens[1], v2str);
+  mpiac->SetVar(tokens[1], v2str);
 }
 // Une ligne du NTuple/NTupleInterface -> variable interpreteur
@@ -509,6 +509,20 @@
     }
   }
-  mObjMgr->SetVar(tokens[2], v2str);
+  mpiac->SetVar(tokens[2], v2str);
   if (adel) delete nti;
+}
+// Operation sur objets a travers l'adaptateur NObjMgrAdapter::PerformOperation()
+else if (kw == "objaoper") {
+  if (tokens.size() < 2) {
+    cout << "Usage: objaoper objname operation [args ...]" << endl; 
+    return(0); 
+  }
+  NObjMgrAdapter* oa = mObjMgr->GetObjAdapter(tokens[0]);
+  if(oa == NULL) {
+    cerr << "objaoper Error , No such object " << tokens[0] << endl; 
+    return(0);
+  }
+  tokens.erase(tokens.begin());
+  return oa->PerformOperation(tokens);
 }
 
@@ -626,4 +640,14 @@
   srvo->DisplayPoints3D(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
   }
+else if (kw == "plot3dw" ) {  
+  if (tokens.size() < 5) { 
+    cout << "Usage: plot3dw nomobj expx expy expz expwt [expcut opt loop_par]" << endl;
+    return(0); 
+    }
+  if (tokens.size() < 6) tokens.push_back("1");
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->DisplayPoints3DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], 
+			 tokens[6], tokens[7]);
+}
 
 else if (kw == "projh1d" ) {
@@ -1086,4 +1110,11 @@
 usage += "  Related commands: vec2var ntline2var";  
 mpiac->RegisterCommand(kw, usage, this, "Objects");
+kw = "objaoper";
+usage = "Perform an operation through the object adapter NObjMgrAdapter::PerformOperation()\n";
+usage += "  Usage: objaoper objname operation [arg1 ...] \n";
+usage += "  Examples of defined operations : \n";
+usage += "  Matrices: row indx_row , col indx_col \n";  
+usage += "  Arrays: slicexy indx_Z , slicexz indx_Y, sliceyz indxX \n";  
+mpiac->RegisterCommand(kw, usage, this, "Objects");
 
 //------- Commandes trace de fonctions
@@ -1132,7 +1163,7 @@
 usage += "\nLoop parameters can be specified as I1[:I2[:DI]] for(int i=I1; i<I2; i+=DI)"; 
 usage += "\nThe default Cut() expression in true (=1) for all"; 
-usage += "\n\n  Related commands: plot2d plot2de plot2dw plot3d "; 
-usage += "\n        projh1d projh2d  projprof fillvec fillmtx "; 
-usage += "\n        fillnt fillgd1 fillgd2 ntloop exptovec ... ";
+usage += "\n\n Related commands: plot2d plot2de plot2dw plot3d plot3dw"; 
+usage += "\n         projh1d projh2d  projprof fillvec fillmtx "; 
+usage += "\n         fillnt fillgd1 fillgd2 ntloop exptovec ... ";
 grp = "Expr. Plotting";
 mpiac->RegisterHelp(kw, usage, grp);
@@ -1140,5 +1171,5 @@
 usage = "Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) :";
 usage += "\n Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param]";
-usage += "\n  Related commands: plot2de plot2dw plot3d ObjectExpressions ..."; 
+usage += "\n  Related commands: plot2de plot2dw plot3d plot3dw ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "plot2de";
@@ -1153,7 +1184,12 @@
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "plot3d";
-usage = "Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) vs ";
+usage = "Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object)";
 usage += "\n Usage: plot3d nameobj f_X() g_Y() h_Z() [Cut() graphic_attributes loop_param]";
-usage += "\n  Related commands: plot2d plot2dw plot2de plot3d ObjectExpressions ..."; 
+usage += "\n  Related commands: plot2d plot2de plot3dw ObjectExpressions ..."; 
+mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+kw = "plot3dw";
+usage = "Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) with Weight W=k(Object)  ";
+usage += "\n Usage: plot3d nameobj f_X() g_Y() h_Z() k_Wt() [Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: plot2d plot2dw plot3d ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 
Index: /trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 2999)
@@ -564,10 +564,9 @@
 
 myNObj++;
-if ((nobj.length() < 1) || (! isalpha(nobj[0]) ) ) {
-  cout << "NamedObjMgr::AddObj() bad object name " << nobj ;
+if ( !CheckName(nobj) ) {
   sprintf(buff,"O%d", myNObj);
-  nobj = buff;
-  cout << " changed to " << nobj << endl;
-  }
+  cout << "NamedObjMgr::AddObj() Name changed: " << nom << " -> " << buff << endl;
+  nom = buff;
+}
 
 nom = '/' + nrep + '/' + nobj;  
@@ -663,5 +662,6 @@
   return(false);
 }
-if ((n2.length() < 1) || (! isalpha(n2[0])) ) {
+
+if ( !CheckName(n2) ) {
   cout << "NamedObjMgr::RenameObj() Error -  bad new object name" << n2 << endl;
   return(false);
@@ -671,6 +671,6 @@
   cout << "NamedObjMgr::RenameObj() Error -  Object " << nomnew << " exist !" << endl;
   return(false);
-  }
-
+}
+    
 if ( (*itr1).second.lock || (*itr2).second.lock ) {
   cout << "NamedObjMgr::RenameObj() Error - Source or destination directory locked !" 
@@ -1734,2 +1734,11 @@
 }
 
+/* Nouvelle-Fonction */
+bool NamedObjMgr::CheckName(string const & nom)
+{
+if (nom.length() < 1) return false;
+if (! isalpha(nom[0]) ) return false;
+for(int k=0; k<nom.length(); k++)
+  if ((!isalnum(nom[k])) && (nom[k] != '_')) return false;
+return true;
+}
Index: /trunk/SophyaPI/PIext/nobjmgr.h
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/nobjmgr.h	(revision 2999)
@@ -109,4 +109,6 @@
   static bool CheckDirName(string & nom);
   static int  ParseObjectName(string & nom, string & nomrep, string & nomobj);
+// return true if name is valid
+  static bool CheckName(string const & nom);
 
 protected:
Index: /trunk/SophyaPI/PIext/nomgadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomgadapter.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomgadapter.cc	(revision 2999)
@@ -57,5 +57,5 @@
 {
 char buff[128];
-sprintf("%s@%lx", typeid(*mObj).name(), (long)mObj);
+sprintf(buff,"%s@%lx", typeid(*mObj).name(), (long)mObj);
 return(buff);
 }
@@ -70,9 +70,16 @@
 
 /* --Methode-- */
-string NObjMgrAdapter::GetInfoString(int /*lev*/)
+string NObjMgrAdapter::GetInfoString(vector<string>& /*opts*/)
 {
 char buff[128];
-sprintf("Type: %s @ %lx", typeid(*mObj).name(), (long)mObj);
+sprintf(buff, "Type: %s @ %lx", typeid(*mObj).name(), (long)mObj);
 return(buff);
+}
+
+/* --Methode-- */
+int NObjMgrAdapter::PerformOperation(vector<string>& /*opts*/)
+{
+cout << "No operation defined for " << typeid(*mObj).name() << endl;
+return 1;
 }
 
Index: /trunk/SophyaPI/PIext/nomgadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomgadapter.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomgadapter.h	(revision 2999)
@@ -43,6 +43,10 @@
   virtual void	                FillFromString();
 
-// Returns a string with synthetic information about the object (lev-> Level of details)
-  virtual string                GetInfoString(int lev=0);
+// Returns a string with synthetic information about the object 
+// opts : additional optional argument 
+  virtual string                GetInfoString(vector<string>& opts);
+// Perform an operation on the object definded 
+// opts : operation definition 
+  virtual int                   PerformOperation(vector<string>& opts);
 
   virtual void			SavePPF(POutPersist& s, string const & nom);
Index: /trunk/SophyaPI/PIext/nomtarradapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomtarradapter.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomtarradapter.cc	(revision 2999)
@@ -16,4 +16,5 @@
 #include "fioarr.h"
 
+#include "nobjmgr.h"
 
 
@@ -65,4 +66,76 @@
 }
 
+/* --Methode-- */
+template <class T> 
+string NOMAdapter_TArray<T>::GetInfoString(vector<string>& opts)
+{
+  if (opts.size() == 0) return mArr->InfoString();
+  else {
+    char buff[128];
+    if (opts[0] == "rank") {
+      sprintf(buff,"%d", (int)mArr->Rank());
+      return string(buff);      
+    }
+    if (opts[0] == "sizes") {
+      for(int_4 kd=0; kd<mArr->Rank(); kd++) 
+        sprintf(buff,"%ld ", (long)mArr->Size(kd));
+      return string(buff);      
+    }
+    else if ((opts[0] == "size") || (opts[0] == "nelts")) {
+      sprintf(buff, "%ld", (long)mArr->Size()); 
+      return string(buff);
+    }
+    else if (opts[0] == "sum") {
+      MuTyV mtv(mArr->Sum());
+      string s;
+      return mtv.Convert(s);
+    }
+    else return mArr->InfoString();
+  }
+}
+
+/* --Methode-- */
+template <class T> 
+int NOMAdapter_TArray<T>::PerformOperation(vector<string>& opts)
+{
+  bool ok = false;
+  if ((mArr->Rank() >= 3) && (opts.size() >= 2)) {
+    int_4 ks = atoi(opts[1].c_str());
+    TMatrix<T> * slice = new TMatrix<T>;
+    char buff[40];
+    if (opts[0] == "slicexy") {
+      slice->Share(mArr->SubArray(Range::all(), Range::all(), Range(ks), 
+				  Range::first(), Range::first()) );  
+      ok = true; 
+      sprintf(buff,"slicexy_%ld",(long)ks);
+      cout << "PerformOperation(): Extracting SliceXY(" << ks << ") from array" << endl;
+    }
+    else if (opts[0] == "sliceyz") {
+      slice->Share(mArr->SubArray(Range(ks), Range::all(), Range::all(), 
+				  Range::first(), Range::first()) );  
+      ok = true; 
+      sprintf(buff,"sliceyz_%ld",(long)ks);
+      cout << "PerformOperation(): Extracting SliceYZ(" << ks << ") from array" << endl;
+    }
+    else if (opts[0] == "slicexz") {
+      slice->Share(mArr->SubArray(Range::all(), Range(ks), Range::all(), 
+				  Range::first(), Range::first()) );  
+      ok = true; 
+      sprintf(buff,"slicexz_%ld",(long)ks);
+      cout << "PerformOperation(): Extracting SliceYZ(" << ks << ") from array" << endl;
+    }
+    if (ok) {
+      string nslice;
+      if (opts.size() > 2)  nslice = opts[2];
+      else nslice = buff;
+      NamedObjMgr omg;
+      omg.AddObj(slice, nslice, true); 
+      return 0;
+    }
+  }
+  
+  cout << "NOMAdapter_TArray<T>::PerformOperation(): Error operation/arguments !" << endl;
+  return 1; 
+}
 
 /* --Methode-- */
Index: /trunk/SophyaPI/PIext/nomtarradapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomtarradapter.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomtarradapter.h	(revision 2999)
@@ -26,4 +26,11 @@
 
   virtual AnyDataObj*		CloneDataObj(bool share=false);
+
+// Returns a string with synthetic information about the object 
+// opts : additional optional argument 
+  virtual string                GetInfoString(vector<string>& opts);
+// Perform an operation on the object definded 
+// opts : operation definition 
+  virtual int                   PerformOperation(vector<string>& opts);
 
   virtual void			SavePPF(POutPersist& s, string const & nom);
Index: /trunk/SophyaPI/PIext/nomtmatvecadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 2999)
@@ -17,4 +17,5 @@
 #include "fioarr.h"
 
+#include "nobjmgr.h"
 
 //----------------------------------------------------------------
@@ -71,4 +72,66 @@
 }
 
+/* --Methode-- */
+template <class T> 
+string NOMAdapter_TMatrix<T>::GetInfoString(vector<string>& opts)
+{
+  if (opts.size() == 0) return mMtx->InfoString();
+  else {
+    if (opts[0] == "rank") return string("2");
+    else if (opts[0] == "sizes") {
+      char buff[64];
+      TVector<T>* v = dynamic_cast<TVector<T> *>(mMtx);
+      if (v != NULL) sprintf(buff, "%ld", (long)mMtx->Size());
+      else sprintf(buff, "%ld %ld", (long)mMtx->NRows(), (long)mMtx->NCols()); 
+      return string(buff);
+    }
+    else if ((opts[0] == "size") || (opts[0] == "nelts")) {
+      char buff[32];
+      sprintf(buff, "%ld", (long)mMtx->Size()); 
+      return string(buff);
+    }
+    else if (opts[0] == "sum") {
+      MuTyV mtv(mMtx->Sum());
+      string s;
+      return mtv.Convert(s);
+    }
+    else return mMtx->InfoString();
+  }
+}
+
+/* --Methode-- */
+template <class T> 
+int NOMAdapter_TMatrix<T>::PerformOperation(vector<string>& opts)
+{
+  bool ok = false;
+  if (opts.size() >= 2) {
+    int_4 kk = atoi(opts[1].c_str());
+    TVector<T> * vrc = new TVector<T>;
+    char buff[40];
+    if ((opts[0] == "row") || (opts[0] == "line")) { 
+      vrc->Share(mMtx->Row((sa_size_t)kk));  
+      ok = true; 
+      sprintf(buff,"row_%ld",(long)kk);
+      cout << "PerformOperation(): Extracting Row(" << kk << ") from matrix" << endl;
+    }
+    else if ((opts[0] == "col") || (opts[0] == "column")) { 
+      vrc->Share(mMtx->Column((sa_size_t)kk));  
+      ok = true; 
+      sprintf(buff,"col_%ld",(long)kk);
+      cout << "PerformOperation(): Extracting Column(" << kk << ") from matrix" << endl;
+    }
+    if (ok) {
+      string nvrc;
+      if (opts.size() > 2)  nvrc = opts[2];
+      else nvrc = buff;
+      NamedObjMgr omg;
+      omg.AddObj(vrc, nvrc, true); 
+      return 0;
+    }
+  }
+  
+  cout << "NOMAdapter_TMatrix<T>::PerformOperation(): Error operation/arguments !" << endl;
+  return 1; 
+}
 
 /* --Methode-- */
Index: /trunk/SophyaPI/PIext/nomtmatvecadapter.h
===================================================================
--- /trunk/SophyaPI/PIext/nomtmatvecadapter.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/nomtmatvecadapter.h	(revision 2999)
@@ -27,4 +27,11 @@
 
   virtual AnyDataObj*		CloneDataObj(bool share=false);
+
+// Returns a string with synthetic information about the object 
+// opts : additional optional argument 
+  virtual string                GetInfoString(vector<string>& opts);
+// Perform an operation on the object definded 
+// opts : operation definition 
+  virtual int                   PerformOperation(vector<string>& opts);
 
   virtual void			SavePPF(POutPersist& s, string const & nom);
Index: /trunk/SophyaPI/PIext/piacmd.cc
===================================================================
--- /trunk/SophyaPI/PIext/piacmd.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/piacmd.cc	(revision 2999)
@@ -322,4 +322,18 @@
 }
 
+/* --Methode-- */
+bool PIACmd::GetVarApp(string const & vn, string & vv)
+{
+  vv = "";
+  if (mObjMgr == NULL) return false;
+  vector<string> opts;
+  SplitStringToVString(vn, opts, '.');
+  string nom = opts[0];
+  opts.erase(opts.begin());
+  NObjMgrAdapter* obja = mObjMgr->GetObjAdapter(nom);
+  if (obja == NULL) return false;
+  vv = obja->GetInfoString(opts);
+  return true;
+}
 
 /* --Methode-- */
Index: /trunk/SophyaPI/PIext/piacmd.h
===================================================================
--- /trunk/SophyaPI/PIext/piacmd.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/piacmd.h	(revision 2999)
@@ -59,4 +59,7 @@
   virtual void		UpdateHelpList(PIAHelpWind* hw, int gid);
 
+// Acces aux objets transforme en string 
+  virtual bool    GetVarApp(string const & vn, string & vv);
+
 protected:
   virtual int   ExecuteCommandLine(string & kw, vector<string> & tokens, 
Index: /trunk/SophyaPI/PIext/servnobjm.cc
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.cc	(revision 2998)
+++ /trunk/SophyaPI/PIext/servnobjm.cc	(revision 2999)
@@ -509,4 +509,44 @@
 
 /* --Methode-- */
+void Services2NObjMgr::DisplayPoints3DW(string& nom,  string& expx, string& expy, string& expz, 
+                                        string& expwt, string& expcut, string dopt, string loop)
+{
+NObjMgrAdapter* obja=NULL;
+obja = MyObjMgr()->GetObjAdapter(nom);
+if (obja == NULL) {
+  cout << "Services2NObjMgr::DisplayPoints3D() Error , No such object " << nom << endl; 
+  return;
+  }
+if (!mImgapp)  return; 
+
+char* ntn[4] = {"expx","expy","expz","expw"};
+NTuple* nt = new NTuple(4,ntn);  // Creation NTuple
+
+ComputeExpressions(obja, expx, expy, expz, expwt, expcut, loop, nt, NULL, NULL);
+
+if (nt->NEntry() < 1) {
+  cout << "Services2NObjMgr::DisplayPoints3DW() Warning  Zero points satisfy cut !" << endl;
+  delete nt;
+  return;
+  }
+//DBG nt->Show();
+//DBG nt->Print(0,10);
+PINTuple3D* pin = new PINTuple3D(nt, true);
+pin->SelectXYZ(ntn[0], ntn[1], ntn[2]);
+pin->SelectWt(ntn[3]);
+pin->UseColorScale(true);
+dopt = "defline " + dopt;
+
+// Pour plot a partir de DispScDrawer
+// string nomdisp = "_NT3D_";
+// mImgapp->DispScDrawer( (PIDrawer*)pin, nomdisp, opt);
+// Pour plot a partir de Disp3DDrawer
+string titre =  nom + ":" + expy + "%" + expx + " W=" + expwt;
+mImgapp->Disp3DDrawer(pin, titre, dopt);
+
+return;
+}
+
+/* --Methode-- */
 void Services2NObjMgr::ProjectH1(string& nom, string& expx, string& expwt, 
                                  string& expcut, string& nomh1, string dopt, string loop)
Index: /trunk/SophyaPI/PIext/servnobjm.h
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.h	(revision 2998)
+++ /trunk/SophyaPI/PIext/servnobjm.h	(revision 2999)
@@ -80,4 +80,7 @@
   virtual void          DisplayPoints2DW(string & nom, string& expx, string& expy, 
                                          string& expwt, string& expcut, string dopt="", string loop="");
+  virtual void          DisplayPoints3DW(string & nom, string& expx, string& expy, string& expz, 
+					 string& expwt, string& expcut, string dopt="", string loop="");
+
 //  Projection d'expressions dans histogramme, vecteur/matrices (et trace) 
   virtual void          ProjectH1(string & nom, string& expx, string& expwt, string& expcut, 
