Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 349)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 357)
@@ -255,11 +255,16 @@
   double xmin, xmax;
   xmin = 0.;  xmax = n;
-  if (tokens.size() < 3)  tokens.push_back("0.");
-  if (tokens.size() < 4)  tokens.push_back("n");
-  mObjMgr->GetServiceObj()->PlotFunc(tokens[2], tokens[0], xmin, xmax, n, tokens[3]); 
+  if (tokens.size() < 3)  { 
+    Vector* v = new Vector(n);
+    mObjMgr->AddObj(v, tokens[0]);
+    }
+  else {
+    if (tokens.size() < 4)  tokens.push_back("");
+    mObjMgr->GetServiceObj()->PlotFunc(tokens[2], tokens[0], xmin, xmax, n, tokens[3]); 
+    }
   }
 else if (kw == "newmtx") {
   if (tokens.size() < 3) { 
-    cout << "Usage: newvec name sizeX sizeY [f(i,j) dopt] " << endl; return(0); 
+    cout << "Usage: newvec name sizeX(Col) sizeY(Lines) [f(i,j) dopt] " << endl; return(0); 
     }
   int nx = atoi(tokens[1].c_str());
@@ -268,8 +273,13 @@
   xmin = 0.;  xmax = nx;
   ymin = 0.;  ymax = ny;
-  if (tokens.size() < 4)  tokens.push_back("0.");
-  if (tokens.size() < 5)  tokens.push_back("n");
-  mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax, 
-                                       nx, ny, tokens[4]);
+  if (tokens.size() < 4)  {
+    Matrix* mtx = new Matrix(ny,nx);
+    mObjMgr->AddObj(mtx, tokens[0]);
+    }
+  else {
+    if (tokens.size() < 5)  tokens.push_back("n");
+    mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax, 
+                                         nx, ny, tokens[4]);
+    }
   }
 
@@ -333,5 +343,5 @@
 else if ( (kw == "func") ) {
   if (tokens.size() < 4) { cout << "Usage: func f(x) xmin xmax npt [opt]" << endl; return(0); }
-  string opt = "n";
+  string opt = "";
   if (tokens.size() > 4)  opt = tokens[4];
   int np;
@@ -346,5 +356,5 @@
 else if ( (kw == "funcff") ) {
   if (tokens.size() < 5) { cout << "Usage: funcff C-filename f(x)-name xmin xmax npt [opt]" << endl; return(0); }
-  string opt = "n";
+  string opt = "";
   if (tokens.size() > 5)  opt = tokens[5];
   int np;
@@ -359,5 +369,5 @@
 else if ( (kw == "func2d") ) {
   if (tokens.size() < 7) {
-    cout << "Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty opt" << endl;
+    cout << "Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [opt]" << endl;
     return(0);
     }
@@ -372,5 +382,5 @@
   xmin = atof(tokens[1].c_str());   xmax = atof(tokens[2].c_str());
   ymin = atof(tokens[4].c_str());   ymax = atof(tokens[5].c_str());
-  string opt = "n";
+  string opt = "";
   if (tokens.size() > 7)  opt = tokens[7];
   string nom = "";
@@ -379,5 +389,5 @@
 else if ( (kw == "func2dff") ) {
   if (tokens.size() < 8) {
-    cout << "Usage: func2d C-filename F(x,y)-name xmax nptx ymin ymax npty opt" << endl;
+    cout << "Usage: func2d C-filename F(x,y)-name xmax nptx ymin ymax npty [opt]" << endl;
     return(0);
     }
@@ -392,5 +402,5 @@
   xmin = atof(tokens[2].c_str());   xmax = atof(tokens[3].c_str());
   ymin = atof(tokens[5].c_str());   ymax = atof(tokens[6].c_str());
-  string opt = "n";
+  string opt = "";
   if (tokens.size() > 8)  opt = tokens[8];
   string nom = "";
@@ -400,95 +410,120 @@
 // >>>>>>>>>>>  Trace d'expressions de N_Tuple, StarList, etc ...
 else if (kw == "plot2d" ) {
-  if (tokens.size() < 4) {
-    cout << "Usage: plot2d nameobj expx expy [experrx experry] expcut [opt]" << endl;
+  if (tokens.size() < 3) {
+    cout << "Usage: plot2d nameobj expx expy [expcut opt loop_par]" << endl;
     return(0); 
     }
-  string errx = ""; string erry = ""; string ecut = "1";
-  string opt = "n";
-  if (tokens.size() < 6) { // Plot sans les erreurs
-    ecut = tokens[3];
-    if (tokens.size() > 4)  opt = tokens[4];
-    }
-  else {                 // Plot avec les erreurs
-    errx = tokens[3]; erry = tokens[4]; ecut = tokens[5];
-    if (tokens.size() > 6)  opt = tokens[6];
-    }
-  srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],errx,erry,ecut,opt);
-  }
-
-else if (kw == "plot2dw" ) {
+  string errx = ""; string erry = ""; 
+  if (tokens.size() < 4) tokens.push_back("1");
+  while (tokens.size() < 6) tokens.push_back("");
+  srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],errx,erry,tokens[3],tokens[4],tokens[5]);
+  }
+
+else if (kw == "plot2de" ) {  // Plot2D avec les erreurs 
+  if (tokens.size() < 5) {
+    cout << "Usage: plot2de nameobj expx expy experrx experry [expcut opt loop_par]" << endl;
+    return(0); 
+    }
+  if (tokens.size() < 6) tokens.push_back("1");
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],tokens[3],tokens[4],
+                        tokens[5],tokens[6],tokens[7]);
+  }
+
+else if (kw == "plot2dw" ) {   // Plot2d avec poids
+  if (tokens.size() < 4) { 
+    cout << "Usage: plot2dw nomobj expx expy expwt [expcut opt loop_par]" << endl;
+    return(0); 
+    }
+  if (tokens.size() < 5) tokens.push_back("1");
+  while (tokens.size() < 7) tokens.push_back("");
+  srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
+  }
+else if (kw == "plot3d" ) {  
+  if (tokens.size() < 4) { 
+    cout << "Usage: plot3d nomobj expx expy expz [expcut opt loop_par]" << endl;
+    return(0); 
+    }
+  if (tokens.size() < 5) tokens.push_back("1");
+  while (tokens.size() < 7) tokens.push_back("");
+  srvo->DisplayPoints3D(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
+  }
+
+else if (kw == "projh1d" ) {
+  if (tokens.size() < 3) { 
+    cout << "Usage: projh1d nomh1 nomobj expx [expwt expcut opt loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 4) tokens.push_back("1.");
+  if (tokens.size() < 5) tokens.push_back("1");
+  while (tokens.size() < 7) tokens.push_back("");
+  srvo->ProjectH1(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
+  }
+
+
+// Projection dans histogrammes
+else if (kw == "projh2d" ) {
+  if (tokens.size() < 4) { 
+    cout << "Usage: projh2d nomh2 nomobj expx expy [expwt expcut opt loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 5) tokens.push_back("1.");
+  if (tokens.size() < 6) tokens.push_back("1");
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->ProjectH2(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
+                  tokens[6], tokens[7] );
+  }
+
+else if (kw == "projprof" ) {
+  if (tokens.size() < 4) { 
+    cout << "Usage: projprof nomprof nomobj expx expy [expwt expcut opt loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 5) tokens.push_back("1.");
+  if (tokens.size() < 6) tokens.push_back("1");
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->ProjectHProf(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
+                    tokens[6], tokens[7] );
+  }
+
+// Projection dans vector/matrix
+else if (kw == "fillvec" ) {
+  if (tokens.size() < 4) { 
+    cout << "Usage: fillvec nomvec nomobj expx expv [expcut opt loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 5) tokens.push_back("1");
+  while (tokens.size() < 7) tokens.push_back("");
+  srvo->FillVect(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
+  }
+
+else if (kw == "fillmtx" ) {
   if (tokens.size() < 5) { 
-    cout << "Usage: plot2dw nomobj expx expy expwt expcut opt" << endl;
-    return(0); 
-    }
-  string opt = "n";
-  if (tokens.size() > 5)  opt = tokens[5];
-  srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], opt);
-  }
-else if (kw == "plot3d" ) {
+    cout << "Usage: fillmtx nommtx nomobj expx expy expv [expcut opt loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 6) tokens.push_back("1");
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->FillMatx(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
+                    tokens[6], tokens[7] );
+  }
+
+// Remplissage NTuple,Vecteurs, ... , boucle de NTuple
+else if (kw == "fillnt" ) {
   if (tokens.size() < 5) { 
-    cout << "Usage: plot3d nomobj expx expy expz expcut opt" << endl;
-    return(0); 
-    }
-  string opt = "n";
-  if (tokens.size() > 5)  opt = tokens[5];
-  srvo->DisplayPoints3D(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], opt);
-  }
-
-else if (kw == "projh1d" ) {
-  if (tokens.size() < 5) { 
-    cout << "Usage: projh1d nomobj expx expwt expcut nomh1 opt" << endl;
-    return(0);
-    }
-  string opt = "n";
-  if (tokens.size() > 5)  opt = tokens[5];
-  srvo->ProjectH1(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], opt);
-  }
-
-else if (kw == "projh2d" ) {
-  if (tokens.size() < 6) { 
-    cout << "Usage: projh2 nomobj expx expy expwt expcut nomh2 opt" << endl;
-    return(0);
-    }
-  string opt = "n";
-  if (tokens.size() > 6)  opt = tokens[6];
-
-  srvo->ProjectH2(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], opt);
-  }
-
-else if (kw == "projprof" ) {
-  if (tokens.size() < 6) { 
-    cout << "Usage: projprof nomobj expx expy expwt expcut nomprof opt" << endl;
-    return(0);
-    }
-  string opt = "n";
-  if (tokens.size() > 6)  opt = tokens[6];
-
-  srvo->ProjectHProf(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], opt);
-  }
-
-else if (kw == "fillnt" ) {
-  if (tokens.size() < 6) { 
-    cout << "Usage: fillnt nameobj expx expy expz expt expcut [ntname]" << endl;
-    return(0);
-    }
-  if (tokens.size() < 7)  tokens.push_back("");
-  srvo->FillNT(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], tokens[6] );
+    cout << "Usage: fillnt nameobj expx expy expz expt [expcut ntname loop_par]" << endl;
+    return(0);
+    }
+  while (tokens.size() < 8) tokens.push_back("");
+  srvo->FillNT(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], tokens[6], tokens[7] );
   }
 
 else if (kw == "ntloop" ) {
   if (tokens.size() < 3) { 
-    cout << "Usage: ntloop nameobj fname funcname [ntname [N1 N2] ]" << endl;
-    return(0);
-    }
-  if (tokens.size() < 4)  tokens.push_back("");
-  if (tokens[3] == "!") tokens[3] = "";
-  int nl1 = -1;
-  int nl2 = -1;
-  if (tokens.size() > 5) { 
-    nl1 = atoi(tokens[4].c_str()); 
-    nl2 = atoi(tokens[5].c_str());
-    }
-  srvo->FillNTFrCFile(tokens[0],tokens[1], tokens[2], tokens[3], nl1, nl2);
+    cout << "Usage: ntloop nameobj fname funcname [ntname loop_par ]" << endl;
+    return(0);
+    }
+  while (tokens.size() < 5) tokens.push_back("");
+  srvo->FillNTFrCFile(tokens[0],tokens[1], tokens[2], tokens[3], tokens[4]);
   }
 
@@ -501,33 +536,32 @@
   }
 
-else if (kw == "fillvec" ) {
-  if (tokens.size() < 4) { 
-    cout << "Usage: fillvec nameobj expx expcut nomvec opt" << endl;
-    return(0);
-    }
-  string opt = "n";
-  if (tokens.size() > 4)  opt = tokens[4];
-  srvo->FillVect(tokens[0],tokens[1],tokens[2], tokens[3], opt);
+else if (kw == "exptovec" ) {
+  if (tokens.size() < 3) { 
+    cout << "Usage: exptovec nomvec nameobj expx [expcut opt loop_par]" << endl;
+    return(0);
+    }
+  while (tokens.size() < 6) tokens.push_back("");
+  srvo->ExpressionToVector(tokens[1],tokens[2],tokens[3],tokens[0],tokens[4],tokens[5]);
   }
 
 else if (kw == "fillgd1" ) {
   if (tokens.size() < 5) {
-    cout << "Usage: fillgd1 nomobj expx expy experry expcut nomgfd" << endl;
-    return(0);
-    }
-  string nomgfd = "";
-  if (tokens.size() > 5) nomgfd = tokens[5];
+    cout << "Usage: fillgd1 nomgfd nomobj expx expy experry [expcut loop_par] " << endl;
+    return(0);
+    }
+  if (tokens.size() < 6) tokens.push_back("1");
+  if (tokens.size() < 7) tokens.push_back("");
   string expy = "";
-  srvo->FillGFD(tokens[0],tokens[1], expy, tokens[2], tokens[3], tokens[4],nomgfd);
+  srvo->FillGFD(tokens[1],tokens[2], expy, tokens[3], tokens[4], tokens[5], tokens[0]);
   }
 
 else if (kw == "fillgd2" ) {
   if (tokens.size() < 6) {
-    cout << "Usage: fillgd2 nomobj expx expy expz experrz expcut nomgfd" << endl;
-    return(0);
-    }
-  string nomgfd = "";
-  if (tokens.size() > 6) nomgfd = tokens[6];
-  srvo->FillGFD(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5],nomgfd);
+    cout << "Usage: fillgd2 nomgfd nomobj expx expy expz experrz [expcut loop_par]" << endl;
+    return(0);
+    }
+  if (tokens.size() < 7) tokens.push_back("1");
+  if (tokens.size() < 8) tokens.push_back("");
+  srvo->FillGFD(tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6], tokens[0], tokens[7]);
   }
 
@@ -713,11 +747,12 @@
 mpiac->RegisterCommand(kw, usage, this, "Objects");
 kw = "newvec";
-usage = "Creates (and fills) a vector \n Usage: newvec name size [f(i) [dopt] ] ";
+usage = "Creates (and optionaly fills) a vector \n Usage: newvec name size [f(i) [dopt] ] ";
 usage += "\n  Related commands: newmtx";  
-mpiac->RegisterCommand(kw, usage, this, "Objets");
+mpiac->RegisterCommand(kw, usage, this, "Objects");
 kw = "newmtx";
-usage = "Creates (and fills) a matrix \n Usage: newvec name sizeX sizeY [f(i,j) [dopt] ] ";
+usage = "Creates (and optionaly fills) a matrix \n";
+usage +="  Usage: newvec name sizeX(Col) sizeY(Lines) [f(i,j) [dopt] ] ";
 usage += "\n  Related commands: newvec";  
-mpiac->RegisterCommand(kw, usage, this, "Objets");
+mpiac->RegisterCommand(kw, usage, this, "Objects");
 
 kw = "disp";
@@ -785,53 +820,80 @@
 mpiac->RegisterCommand(kw, usage, this, "Func Plot");
 
+kw = "ObjectExpressions";
+usage = "Any mathematical expression (math.h) with object variables can be used";
+usage += "\n  ------ Object Variable names (double) -------- ";
+usage += "\nNTuple varnames - Histo1D/HProf: i,x,val,err - Histo2D: i,j,x,y,val,err";
+usage += "\nVector: i,val - Matrix: i,j,val - Image: x=i,y=j, pix=val";
+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  Related commands: plot2d plot2de plot2dw plot3d "; 
+usage += "\n        projh1d projh2d  projprof fillvec fillmtx "; 
+usage += "\n        fillnt fillgd1 fillgd2 ntloop exptovec ... ";
+mpiac->RegisterCommand(kw, usage, NULL, "Expr. Plotting");
 kw = "plot2d";
 usage = "Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) :";
-usage += "\nNTuple varnames - Histo1D/HProf: i,x,val,err - Histo2D: i,j,x,y,val,err";
-usage += "\nVector: i,val - Matrix: i,j,val - Image: x=i,y=j, pix=val";
-usage += "\n Usage: plot2d nameobj f_X() g_Y() [ f_ErrX() f_ErrY() ] f_Cut() [graphic_attributes]";
-usage += "\n  Related commands: plot2dw plot3d  projh1d  projh2d  projprof  fillnt fillvec fillgd1 ";
+usage += "\n Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: plot2de plot2dw plot3d ObjectExpressions ..."; 
+mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+kw = "plot2de";
+usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object) ";
+usage += "\n Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: plot2d plot2dw plot3d ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "plot2dw";
 usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object) ";
-usage += "\n Usage: plot2dw nameobj f_X() g_Y() h_Wt() Cut() [graphic_attributes]";
-usage += "\n  Related commands: plot2d  projh1d  projh2d  projprof  fillnt fillvec ";
+usage += "\n Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: plot2d plot2dw plot3d ObjectExpressions ..."; 
 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 += "\n Usage: plot3d nameobj f_X() g_Y() h_Z() Cut() [graphic_attributes]";
-usage += "\n  Related commands: plot2d plot2dw projh1d  projh2d  projprof  fillnt fillvec ";
+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 ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 
 kw = "projh1d";
 usage = "Projects X=f(Object) with weight WT=h(Object) into a 1D histogram ";
-usage += "\n Usage: projh1d nameobj f_X() h_WT() Cut() nameh1d [graphic_attributes]";
+usage += "\n Usage: projh1d nameh1d nameobj f_X() [h_WT()=1. Cut() graphic_attributes loop_param]";
 usage += "\n   Histo1D nameh1d is created if necessary ";
-usage += "\n  Related commands: plot2d  projh2d  projprof fillnt  fillvec ";
+usage += "\n  Related commands: projh2d projprof ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "projh2d";
 usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram ";
-usage += "\n Usage: projh2d nameobj f_X() g_Y() h_WT() Cut() nameh2d [graphic_attributes]";
+usage += "\n Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
 usage += "\n   Histo2D nameh2d is created if necessary ";
-usage += "\n  Related commands: plot2d  projh1d projprof ";
+usage += "\n  Related commands: projh1d projprof ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "projprof";
 usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram ";
-usage += "\n Usage: projh2d nameobj f_X() g_Y() h_WT() Cut() nameprof [graphic_attributes]";
+usage += "\n Usage: projh2d nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
 usage += "\n   HProf nameprof is created if necessary ";
-usage += "\n  Related commands: plot2d  projh2d  ";
+usage += "\n  Related commands: projh1d projh2d ObjectExpressions ..."; 
+mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+kw = "fillvec";
+usage = "Fills a Vector V((int)(f_X(Object)+0.5)) =  h_V(Object) ";
+usage += "\n Usage: fillvec namevec nameobj f_X() h_V() [Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: fillmtx fillnt ObjectExpressions ..."; 
+mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+kw = "fillmtx";
+usage = "Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) =  h_V(Object) ";
+usage += "\n Usage: fillvec namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: fillvec fillnt ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 
 kw = "fillnt";
 usage = "Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
-usage += "\n Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() Cut() nameNt";
+usage += "\n Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]";
 usage += "\n  Related commands: ntloop plot2d projh1d projh2d projprof ";
-mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+usage += "\n  Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ..."; 
+mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+
 kw = "ntloop";
 usage = "Loops over an Object NTupleInterface calling a function from a C-file \n";
 usage += "and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
-usage += "\n Usage: ntloop nameobj CFileName FuncName [NtupleName [N1 N2] ]";
-usage += "\n Or:    ntloop nameobj CFileName FuncName ! N1 N2 ";
+usage += "\n Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]";
+usage += "\n  Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ..."; 
 usage += "\n  Related commands: ntexpcfile fillnt";
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
+
 kw = "ntexpcfile";
 usage = "Creates a C-File with declarations suitable to be used for ntloop";
@@ -840,18 +902,18 @@
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 
-kw = "fillvec";
+kw = "exptovec";
 usage = "Creates and Fills a Vector with X=f(Object)";
-usage += "\n Usage: fillvec nameobj f_X() Cut() nameVec [graphic_attributes]";
-usage += "\n  Related commands: plot2d  projh1d  fillnt ";
+usage += "\n Usage: exptovec namevec nameobj f_X() [Cut() graphic_attributes loop_param]";
+usage += "\n  Related commands: ntloop fillnt ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "fillgd1";
 usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), ErrY=h(...))";
-usage += "\n Usage: fillgd1 nameobj f_X() g_Y() h_ErrY() Cut() nameGfd";
-usage += "\n  Related commands: plot2d  fillnt ";
+usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_ErrY() [Cut() loop_param]";
+usage += "\n  Related commands: ntloop fillnt ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 kw = "fillgd2";
 usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)";
-usage += "\n Usage: fillgd1 nameobj f_X() g_Y() h_Z() k_ErrZ() Cut() nameGfd";
-usage += "\n  Related commands: plot2d  fillgd2 ";
+usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]";
+usage += "\n  Related commands: ntloop fillnt ObjectExpressions ..."; 
 mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
 
