Index: trunk/SophyaPI/PIext/contmodex.cc
===================================================================
--- trunk/SophyaPI/PIext/contmodex.cc	(revision 1919)
+++ trunk/SophyaPI/PIext/contmodex.cc	(revision 1920)
@@ -24,5 +24,6 @@
   cout << " registration of contour commands "<<endl;
   string hgrp,kw,usage;
-  hgrp = "OlivierCmd";
+  
+  hgrp = "Obj. Display";
   
   kw = "contour";
@@ -31,4 +32,5 @@
   mpiac->RegisterCommand(kw, usage, this, hgrp);
   
+  hgrp = "Obj. Display";
   kw = "ntcont";
   usage = "Creates and displays a ContourDrawer (from a NTuple)";
Index: trunk/SophyaPI/PIext/flowmodex.cc
===================================================================
--- trunk/SophyaPI/PIext/flowmodex.cc	(revision 1920)
+++ trunk/SophyaPI/PIext/flowmodex.cc	(revision 1920)
@@ -0,0 +1,149 @@
+#include "flowmodex.h"
+#include "pi2dvec.h"
+
+#include <typeinfo> 
+
+#include <vector>
+#include <string>
+#include "nobjmgr.h"
+#include "ntuple.h"
+
+#include "pidrawer.h"
+#include "nomgadapter.h"
+#include "servnobjm.h"
+
+
+/* --Methode-- */
+FlowModExecutor::FlowModExecutor(PIACmd* mpiac, PIStdImgApp* app)
+{
+
+
+  //cout << " FlowModExecutor::FlowModExecutor() mpiac = " << (unsigned long)mpiac << endl;
+  cout << " registration of flow chart commands "<<endl;
+  string hgrp,kw,usage;
+  hgrp = "Obj. Display";
+  
+  kw = "nt2dvec";
+  usage = "Creates and displays a flow chart from ntuple variables";
+  usage += "\n Usage: nt2dvec x y vx vy [graphic_att] ";
+  mpiac->RegisterCommand(kw, usage, this, hgrp);
+
+
+  hgrp = "Expr. Plotting";
+  kw = "plot2dvec";
+  usage = "Creates and displays a flow chart from ntuple expressions ";
+  usage +=  "\n Usage: plot2dvec ntuple expx expy expvx expvy [cut graphic_att loop_par]"; 
+  
+  mpiac->RegisterCommand(kw, usage, this, hgrp);
+  
+  //cout << " Out of ContModExecutor::ContModExecutor() " << endl;
+
+}
+ 
+
+
+/* --Methode-- */
+FlowModExecutor::~FlowModExecutor()
+{
+}
+
+/* --Methode-- */
+int FlowModExecutor::Execute(string& kw, vector<string>& tokens, string& toks)
+{
+  
+int nz=-1;
+double z0,dz;
+PI2dVecDrawer *p2dv;
+string dopt="";
+NamedObjMgr omg;
+
+if ( kw == "nt2dvec") {
+   
+ 
+   if (tokens.size() < 5) {
+     cout << "Usage: nt2dvec ntuple x y vx vy [graphic_att]" << endl;
+     return(0);
+   }
+   NObjMgrAdapter* obja = omg.GetObjAdapter(tokens[0]);
+   if (obja == NULL) {
+     cout << "contour Error , No object with name " << tokens[0] << endl; 
+     return(0);
+   }
+     
+   if (tokens.size() > 5) dopt = tokens[5];
+   bool adel;
+
+   NTupleInterface *ntin = obja->GetNTupleInterface(adel);
+
+   p2dv = new PI2dVecDrawer(ntin,adel);
+   string expx,expy;
+   expx = tokens[1];
+   expy = tokens[2];
+   int ret = p2dv->SelectXY(expx.c_str(),expy.c_str());
+   if(ret<0){ cout << "Usage: nt2dvec ntuple x y vx vy [graphic_att]" << endl;  return(0);}
+   expx = tokens[3];
+   expy = tokens[4];
+   ret = p2dv->SelectVW(expx.c_str(),expy.c_str());
+   if(ret<0){ cout << "Usage: nt2dvec ntuple x y vx vy [graphic_att ]" << endl;  return(0);}
+
+   // On affiche le Drawer
+   int wrsid = 0;
+   bool fgsr = true;
+   int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
+   
+   string name = "ChampVec";
+   
+   wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, opt); 
+
+}else if(kw == "plot2dvec"){
+
+  
+  if (tokens.size() < 5) {
+    cout << "Usage: plot2dvec ntuple expx expy expvx expvy [cut graphic_att loop_par]" << endl; 
+    return(0); 
+  }
+
+ 
+  NObjMgrAdapter* obja=NULL;
+  obja = omg.GetObjAdapter(tokens[0]);
+  if (obja == NULL) {
+    cout << "plot2dvec Error , No object with name " << tokens[0] << endl; 
+    return(0);
+  }
+
+  Services2NObjMgr* srvo = omg.GetServiceObj();
+
+  bool adel=true;
+  //NTupleInterface *ntin = obja->GetNTupleInterface(adel);
+  
+  // Creation NTuple 
+  char* ntn[4] = {"expx","expy","expex","expey"};
+  NTuple * ntint = NULL;
+  ntint = new NTuple(4,ntn);
+  // remplissage du ntuple 
+  string bidon = "0.";
+  string nocut = "1.";
+  if(tokens.size()>7) bidon = tokens[7];
+  if(tokens.size()>5) nocut = tokens[5];
+  srvo->ComputeExpressions(obja,tokens[1],tokens[2],tokens[3],tokens[4],nocut,bidon,ntint,NULL,NULL);
+  p2dv = new PI2dVecDrawer(ntint,adel);
+  p2dv->SelectXY(ntn[0],ntn[1]);
+  p2dv->SelectVW(ntn[2],ntn[3]);
+
+  bool fgsr = true;
+  if (tokens.size() > 6) dopt = tokens[6];
+
+  int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
+  string name = "ChampVec";
+   
+  int wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, opt); 
+
+}
+ 
+
+return(0);
+
+}
+
+
+
Index: trunk/SophyaPI/PIext/flowmodex.h
===================================================================
--- trunk/SophyaPI/PIext/flowmodex.h	(revision 1920)
+++ trunk/SophyaPI/PIext/flowmodex.h	(revision 1920)
@@ -0,0 +1,22 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Classe   : commands copntour drawing in Peida Interactive
+// (c) DAPNIA (CEA)                 LAL (IN2P3/CNRS)
+//                           R. Ansari O.Perdereau  11/2001
+//                           
+#ifndef FLOWMODEXE_H_SEEN
+#define FLOWMODEXE_H_SEEN
+#include "machdefs.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <iostream.h> 
+#include "piacmd.h"
+#include "nobjmgr.h"
+
+class FlowModExecutor : public CmdExecutor { 
+public:
+                FlowModExecutor(PIACmd* , PIStdImgApp* );
+  virtual       ~FlowModExecutor();
+  virtual int   Execute(string& keyw, vector<string>& args, string& toks);
+};
+
+#endif
Index: trunk/SophyaPI/PIext/pawexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/pawexecut.cc	(revision 1919)
+++ trunk/SophyaPI/PIext/pawexecut.cc	(revision 1920)
@@ -82,10 +82,12 @@
 piac->RegisterCommand(kw,usage,this,hgrp);
 
+//#ifndef SANS_EVOLPLANCK
 kw = "v/integ";
-usage = "Integrate a TVector";
+usage = "Integrate a TVector / vector";
 usage += "\n v/integ namevec [norm]";
 usage += "\n norm<=0 means no normalisation (def norm=0)";
 usage += "\n  Related commands: h/integ h/deriv v/deriv";
 piac->RegisterCommand(kw,usage,this,hgrp);
+//#endif
 
 kw = "h/deriv";
@@ -95,6 +97,7 @@
 piac->RegisterCommand(kw,usage,this,hgrp);
 
+//#ifndef SANS_EVOLPLANCK
 kw = "v/deriv";
-usage = "Derivate a TVector";
+usage = "Derivate a TVector / vector";
 usage += "\n v/deriv namevec [deriv_option]";
 usage += "\n deriv_option -1 replace v[i] with v[i]-v[i-1]";
@@ -103,4 +106,5 @@
 usage += "\n  Related commands: h/integ h/deriv v/integ";
 piac->RegisterCommand(kw,usage,this,hgrp);
+//#endif
 
 kw = "h/rebin";
@@ -231,10 +235,14 @@
 } else if(kw == "h/integ") {
   h_integ(tokens); return(0);
+  //#ifndef SANS_EVOLPLANCK
 } else if(kw == "v/integ") {
   v_integ(tokens); return(0);
+  //#endif
 } else if(kw == "h/deriv") {
   h_deriv(tokens); return(0);
+  //#ifndef SANS_EVOLPLANCK
 } else if(kw == "v/deriv") {
   v_deriv(tokens); return(0);
+  //#endif
 } else if(kw == "h/rebin") {
   h_rebin(tokens); return(0);
@@ -586,9 +594,20 @@
 r_8 norm=-1.;
 if(tokens.size()>=2) norm = atof(tokens[1].c_str());
+#ifdef SANS_EVOLPLANCK
+Vector* v = dynamic_cast<Vector*>(mobj);
+#else
 TVector<r_8>* v = dynamic_cast<TVector<r_8>*>(mobj);
+#endif
+
 if(!v)
-  {cout<<"PAWExecutor::v_integ Error: "<<tokens[0]<<" not a TVector"<<endl;
-  return;}
+  {cout<<"PAWExecutor::v_integ Error: "<<tokens[0]<<" not a TVector/Vector"<<endl;
+  return;}
+
+#ifdef SANS_EVOLPLANCK
+uint_4 n = v->NElts();
+#else
 uint_4 n = v->Size();
+#endif
+
 if(n==0)
   {cout<<"PAWExecutor::v_integ Error: "<<tokens[0]<<" is an empty vector"<<endl;
@@ -636,14 +655,33 @@
 int_4 deriv_option = 0;
 if(tokens.size()>=2) deriv_option = atoi(tokens[1].c_str());
+
+#ifdef SANS_EVOLPLANCK
+Vector* v = dynamic_cast<Vector*>(mobj);
+#else
 TVector<r_8>* v = dynamic_cast<TVector<r_8>*>(mobj);
+#endif
+
 if(!v)
-  {cout<<"PAWExecutor::v_deriv Error: "<<tokens[0]<<" not a TVector"<<endl;
-  return;}
+  {cout<<"PAWExecutor::v_deriv Error: "<<tokens[0]<<" not a TVector/Vector"<<endl;
+  return;}
+
+
+#ifdef SANS_EVOLPLANCK
+uint_4 n = v->NElts();
+#else
 uint_4 n = v->Size();
+#endif
+
 if(n==0)
   {cout<<"PAWExecutor::v_deriv Error: "<<tokens[0]<<" is an empty vector"<<endl;
   return;}
 if(n<=1) return;
+
+#ifdef SANS_EVOLPLANCK
+Vector vsave(*v);
+#else
 TVector<r_8> vsave(*v,false);
+#endif
+
 if(deriv_option<0) {
   for(uint_4 i=1;i<n;i++) (*v)(i) = vsave(i)-vsave(i-1);
@@ -658,4 +696,5 @@
 }
 }
+
 
 /* methode */
Index: trunk/SophyaPI/PIext/pi2dvec.cc
===================================================================
--- trunk/SophyaPI/PIext/pi2dvec.cc	(revision 1920)
+++ trunk/SophyaPI/PIext/pi2dvec.cc	(revision 1920)
@@ -0,0 +1,170 @@
+// This may look like C code, but it is really -*- C++ -*-
+// classe pour tracer des flow chart (champs de vecteurs) 2d
+// NB herite de PIDrawer 
+// O. Perdereau 01/2002
+// 
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#include "machdefs.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <iostream.h>
+#include <math.h>
+
+#include "histos.h"
+#include "ntuple.h"
+
+#include "nbtri.h" 
+
+#include "pi2dvec.h"
+
+#include <sys/time.h>
+#include <sys/resource.h>
+
+//++
+// Class	PI2dVecDrawer
+// Lib		PIGcont
+// include	pigncont.h2dvec.h
+// 
+// 
+// Classe de trace d'un champ de vecteurs (flow chart) en 2 dimensions
+//
+//
+//--
+//++ 
+// Links        Parents
+// PIDrawer
+//--
+//
+//++
+// Titre	Constructeurs et Méthodes 
+//--
+
+//++
+// PI2dVecDrawer::PI2dVecDrawer(NTupleInterface* nti,bool autodel)
+//  Constructeur 
+// 
+//--
+PI2dVecDrawer::PI2dVecDrawer(NTupleInterface* nti,bool autodel)
+{
+  _nti = nti;
+  
+  _autodel = autodel;
+  SelectXY(NULL, NULL);
+  SelectVW(NULL, NULL);
+
+  // This drawer has *NO* specific control tools 
+  mFgSpecContWind = false;
+
+}
+
+
+/* --Methode-- */
+PI2dVecDrawer::~PI2dVecDrawer()
+{
+  
+  if(_autodel){ //cout << " destructeur de PI2dVecDrawer / autodel "<<endl;
+    if(_nti!=NULL){delete _nti ; _nti=NULL;}
+  }
+
+}
+
+/* --Methode-- */
+void PI2dVecDrawer::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax){
+
+  if(_nti==NULL){cout << " PI2dVecDrawer::Draw : null ntuple "<<endl; return;}
+  if ( (xK < 0) || (yK < 0) ){cout << " PI2dVecDrawer::Draw : no X/Y "<<endl;  return;}
+  if ( (vK < 0) || (wK < 0) ){cout << " PI2dVecDrawer::Draw : no VX/VY "<<endl;  return;}
+
+  int npt = _nti->NbLines();
+  int i=0;
+  double x,y,vx,vy;
+  double xa[2];
+  double ya[2];
+  g->SaveGraphicAtt();
+
+  // choix de la couleur   
+  g->SelForeground(GetGraphicAtt().GetFgColor());
+
+  // choix de la ligne 
+  PILineAtt mlatt = GetGraphicAtt().GetLineAtt() ;
+  if(mlatt==PI_NotDefLineAtt) GetGraphicAtt().SetLineAtt(PI_NormalLine);
+
+  g->SelLine(GetGraphicAtt().GetLineAtt() );
+
+  // choix du marker 
+  if(GetGraphicAtt().GetMarker()==PI_NotDefMarker)
+    GetGraphicAtt().SetMarkerAtt(5,PI_FCircleMarker);
+  g->SelMarker(GetGraphicAtt().GetMarkerSize(),GetGraphicAtt().GetMarker());
+
+  // choix de la fleche 
+  
+  if(GetGraphicAtt().GetArrowMarker()==PI_NotDefArrowMarker)
+    GetGraphicAtt().SetArrowMarkerAtt(5,PI_BasicArrowMarker);
+
+  
+
+   g->SelArrowMarker(GetGraphicAtt().GetArrowMarkerSize(),GetGraphicAtt().GetArrowMarker());
+ 
+
+
+  for(i=0 ; i<npt ; i++){
+    x = _nti->GetCell(i,xK) ;
+    y = _nti->GetCell(i,yK) ;
+    vx = _nti->GetCell(i,vK) + x;
+    vy = _nti->GetCell(i,wK) + y;
+    g->DrawMarker(x,y);
+    
+    //g->DrawLine(x,y,vx,vy);
+    
+    g->DrawArrowMarker(x,y,vx,vy);
+
+  }
+
+  g->RestoreGraphicAtt();
+
+}
+/* --Methode-- */
+void PI2dVecDrawer::UpdateLimits()
+{
+  // Doit calculer les limites
+
+  double xmn,xmx,ymn,ymx;
+  double vmn,vmx;
+
+  _nti->GetMinMax(0,xmn,xmx);
+  _nti->GetMinMax(1,ymn,ymx);
+  
+  SetLimits(xmn, xmx, ymn, ymx);
+}
+
+/* --Methode-- */
+int   PI2dVecDrawer::SelectXY(const char* px, const char* py)
+{
+  string name;
+  if (_nti == NULL)  xK = yK = -1;
+  if (px == NULL) xK = -1;
+  else { name = px; xK = _nti->ColumnIndex(name); }
+  if (py == NULL) yK = -1;
+  else { name = py; yK = _nti->ColumnIndex(name); }
+  
+  int ret = xK;
+  if( ret > yK) ret = yK;
+  return(ret);
+}
+
+/* --Methode-- */
+int  PI2dVecDrawer::SelectVW(const char* px, const char* py)
+{
+  string name;
+  if (_nti == NULL)  vK = vK = -1;
+  if (px == NULL) vK = -1;
+  else { name = px; vK = _nti->ColumnIndex(name); }
+  if (py == NULL) wK = -1;
+  else { name = py; wK = _nti->ColumnIndex(name); }
+  
+  int ret = vK;
+  if( ret > wK) ret = wK;
+  return(ret);
+}
+
Index: trunk/SophyaPI/PIext/pi2dvec.h
===================================================================
--- trunk/SophyaPI/PIext/pi2dvec.h	(revision 1920)
+++ trunk/SophyaPI/PIext/pi2dvec.h	(revision 1920)
@@ -0,0 +1,37 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Classe  PI2dVecDrawer  : trace de flow chart 
+// (c) DAPNIA (CEA)                 LAL (IN2P3/CNRS)
+//                           R. Ansari O.Perdereau  01/2002
+//=========================================================//
+
+#ifndef PI2DVEC_H_SEEN 
+#define PI2DVEC_H_SEEN 
+#include "pistdimgapp.h"
+#include "piscdrawwdg.h"
+#include "ntupintf.h"
+
+class PI2dVecDrawer : public PIDrawer{
+public:
+
+  PI2dVecDrawer(NTupleInterface* nti,bool autodel);
+  virtual           ~PI2dVecDrawer();
+  virtual void      Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
+  virtual void      UpdateLimits();
+  virtual int       SelectXY(const char* px, const char* py);
+  virtual int       SelectVW(const char* px, const char* py);
+
+ 
+protected:
+  bool _autodel;
+  NTupleInterface* _nti;
+  
+  int xK, yK;            // Index du nom de variable en X/Y ds le ntuple
+  int vK, wK;          // Index du nom de variable des longueurs des vecteurs ds le ntuple
+
+};
+
+//
+//
+//
+
+#endif
Index: trunk/SophyaPI/PIext/piacmd.cc
===================================================================
--- trunk/SophyaPI/PIext/piacmd.cc	(revision 1919)
+++ trunk/SophyaPI/PIext/piacmd.cc	(revision 1920)
@@ -18,4 +18,5 @@
 #include "cxxexecwin.h"
 #include "contmodex.h" 
+#include "flowmodex.h"
 
 #include PISTDWDG_H 
@@ -337,4 +338,6 @@
 ContModExecutor *cntxx = new ContModExecutor(this, app);//_OP_
 cntexec = cntxx; //_OP_
+FlowModExecutor *flwxx = new FlowModExecutor(this, app);//_OP_
+flwexec = flwxx; //_OP_
 
 cxxoptwin = new  CxxOptionWind(app, cxxe);
Index: trunk/SophyaPI/PIext/piacmd.h
===================================================================
--- trunk/SophyaPI/PIext/piacmd.h	(revision 1919)
+++ trunk/SophyaPI/PIext/piacmd.h	(revision 1920)
@@ -18,4 +18,5 @@
 #include "dlftypes.h"
 #include "pdlmgr.h"
+#include "ctimer.h"
 
 // Classe definissant l'interface pour un executeur de commande
@@ -117,4 +118,5 @@
 
   CmdExecutor *cntexec; // contour executor _OP_
+  CmdExecutor *flwexec; // flow chart executor _OP_
  
 // Pour enregistrer la liste de commandes et leurs executeurs et le help
Index: trunk/SophyaPI/PIext/pintuple.cc
===================================================================
--- trunk/SophyaPI/PIext/pintuple.cc	(revision 1919)
+++ trunk/SophyaPI/PIext/pintuple.cc	(revision 1920)
@@ -160,5 +160,5 @@
 if (wK >= 0)  mrk = (mmrk != PI_NotDefMarker) ? mmrk : PI_CircleMarker;
 else   mrk = (mmrk != PI_NotDefMarker) ? mmrk : PI_DotMarker;
-msz = GetGraphicAtt().GetMarkerSz();;
+ msz = GetGraphicAtt().GetMarkerSz(); 
 if (msz < 1) msz = 1;
 g->SelMarker(msz, mrk);
Index: trunk/SophyaPI/PIext/pistlist.cc
===================================================================
--- trunk/SophyaPI/PIext/pistlist.cc	(revision 1919)
+++ trunk/SophyaPI/PIext/pistlist.cc	(revision 1920)
@@ -113,7 +113,12 @@
 double ymax2 = uymax;
 
-int msz = mMSz;
+// int msz = mMSz; //OP
+int  msz = GetGraphicAtt().GetMarkerSz(); 
+
 if (msz < 1) msz = 1;
-PIMarker mrk = (mMrk != PI_NotDefMarker) ? mMrk : PI_FCircleMarker;
+//PIMarker mrk = (mMrk != PI_NotDefMarker) ? mMrk : PI_FCircleMarker; //OP
+PIMarker mmrk = GetGraphicAtt().GetMarker();
+PIMarker mrk = (mmrk != PI_NotDefMarker) ? mmrk : PI_FCircleMarker;
+
 // g->SelFont();
 nok = 0;  nl2 = mNLev*2-1;
