Index: trunk/SophyaProg/Tests/tfft.cc
===================================================================
--- trunk/SophyaProg/Tests/tfft.cc	(revision 3088)
+++ trunk/SophyaProg/Tests/tfft.cc	(revision 3089)
@@ -11,4 +11,5 @@
 #include "fftpserver.h"
 #include "fftmserver.h"
+#include "fftmayer.h"
 #include "fftwserver.h"
 #include "ntoolsinit.h"
@@ -48,4 +49,5 @@
 static  int prtlev = 0;
 
+//-------------------------------------------------
 template <class T>
 void TestFFTPack(T seuil, sa_size_t num)
@@ -106,4 +108,5 @@
 }
 
+//-------------------------------------------------
 template <class T>
 int TestFFTS(T seuil, FFTServerInterface & ffts, sa_size_t num)
@@ -197,8 +200,50 @@
 }
 
-
-
-
-
+inline void MayerFFTForw(r_4* d, int sz) {
+  fht_r4(d, sz);
+}
+inline void MayerFFTForw(r_8* d, int sz) {
+  fht_r8(d, sz);
+}
+
+//-------------------------------------------------
+template <class T>
+int MultiFFTTest(T t, sa_size_t sz, int nloop, bool fgp)
+{
+  cout <<" ===> MultiFFTTest<T=r_" << sizeof(T) << "> NLoop= " << nloop << " ArrSz= " << sz << endl;  
+  TVector< T > in(sz), incopie(sz);
+
+  incopie = in = RandomSequence();
+  FFTPackServer fftp(false);
+  TVector< complex<T> > outc;
+    
+  PrtTim("MultiFFT-LoopStart");
+
+  if (fgp) {
+    cout << " --- Test effectue avec FFTPack " << endl;
+    for(int kk=0; kk<nloop; kk++) {
+      in = incopie;
+      //      fftp.FFTForward(in, outc);
+      fftp.fftf(sz, in.Data());
+    }
+  }
+  else { 
+    cout << " --- Test effectue avec FFTMayer " << endl;
+    for(int kk=0; kk<nloop; kk++) {
+      in = incopie;
+      //      in += 0.01;
+      MayerFFTForw(in.Data(), sz);
+    }
+  }
+  PrtTim("MultiFFT-LoopEnd");
+  cout << " ----- End ---- MultiFFTTest<T> ----" << endl;
+  return 0;
+}
+
+
+
+//-------------------------------------------------
+//-------------------------------------------------
+//-------------------------------------------------
 int main(int narg, char* arg[])
 {
@@ -209,9 +254,13 @@
   if (narg < 3) {
     cout << "tfft/ args error - \n  Usage tfft size p/P/M/W [f/d/F/D  PrtLev=0 MaxNPrt=50 diffthr] \n" 
+	 << "    OR  tfft size P/M FL/DL/FZ/DZ  [NFFT=10]  \n" 
 	 << " 1D real/complex-FFT test (FFTServer) \n"
 	 << " size: input vector length \n " 
 	 << " p=FFTPackTest  P=FFTPack, M=FFTMayer, W= FFTWServer \n " 
          << " F/f:float, D/d:double F/D:random in_vector (default=D) \n" 
-         << " diffthr : Threshold for diff checks (=10^-6/10^-4 double/float)" << endl;
+         << "  FL/DL : perform NFFT on a serie of float[size] or double[size] " 
+         << "  FZ/DZ : perform NFFT on a series of complex<float>[size] or complex<double>[size] " 
+         << " diffthr : Threshold for diff checks (=10^-6/10^-4 double/float)" 
+	 << endl;
     return(1);
   }
@@ -239,8 +288,18 @@
   dtyp = toupper(dtyp);
 
+
   FFTServerInterface * ffts;
   if (*arg[2] == 'M')  ffts = fftm.Clone();
   else if (*arg[2] == 'W')  ffts = fftw.Clone();
   else ffts = fftp.Clone();
+
+  int nloop = 0;
+  bool fgpack = true;
+  if (arg[3][1] == 'L') {  // MultiFFT test 
+    nloop = 10;
+    if (narg > 4) nloop = atoi(arg[4]);
+    if (*arg[2] == 'M')  fgpack = false;
+  }
+
 
   cout << "\n ============================================= \n"
@@ -255,4 +314,5 @@
       cout << "   ------ Testing FFTServer for double (r_8)----- " << endl;
       if (*arg[2] == 'p') TestFFTPack(ds, sz);
+      else if (nloop > 0) rc = MultiFFTTest(ds, sz, nloop, fgpack);
       else rc = TestFFTS(ds, *ffts, sz);
     }
@@ -260,4 +320,5 @@
       cout << "   ------ Testing FFTServer for float (r_4)----- " << endl;
       if (*arg[2] == 'p') TestFFTPack(fs, sz);
+      else if (nloop > 0) rc = MultiFFTTest(fs, sz, nloop, fgpack);
       else rc = TestFFTS(fs, *ffts, sz);
     }
Index: trunk/SophyaProg/Tests/tswfits.cc
===================================================================
--- trunk/SophyaProg/Tests/tswfits.cc	(revision 3088)
+++ trunk/SophyaProg/Tests/tswfits.cc	(revision 3089)
@@ -11,5 +11,10 @@
 #include "swfitsdtable.h"
 
+#include "datatable.h"
+#include "fitshdtable.h"
+
 void test_fdtable() ; 
+static long NROW = 64;
+static long NPRT = 10;
 
 int main(int narg, char *arg[])
@@ -17,11 +22,11 @@
   SophyaInit();
   FitsIOServerInit();
+  if (narg < 3) {
+    cout << "Erreur arg/Usage: tswfits NRowTable NPRT" << endl;
+    return 1;
+  }
+  NROW = atoi(arg[1]);
+  NPRT = atoi(arg[2]);
   try {
-    /*
-    if (*arg[1] == 'd')  test_dvl();
-    else if (*arg[1] == 'n')  test_ntuple();
-    //    else if (*arg[1] == 'x')  test_xntuple();
-    else if (*arg[1] == 'X')  test_Xntuple();
-    */
     test_fdtable();
   }
@@ -35,4 +40,5 @@
     cerr << "tswfits-main() , Catched ... ! " << endl;
   }
+  
 }
 
@@ -40,9 +46,9 @@
 void test_fdtable() 
 {
-  cout << "======= test_fdtable:  simple DataTable+FITS test ======= " << endl;
+  cout << "======= test_fdtable:  simple SwapOnFits test ======= " << endl;
     int SWSEGSZ = 4;
     vector<int_8> tags;
     {
-      cout << " Creation FITSDataSwapper<double> swout(so) avec swseg.fits " << endl;
+      cout << "1/ Creation FITSDataSwapper<double> swout(so) avec swseg.fits " << endl;
       vector<string> ttype, tform, tunit;
       ttype.push_back("D-Col1");
@@ -74,10 +80,10 @@
     }
     {
-      cout << "6/ Creation PPFDataSwapper<float> avec lecture depuis swseg.ppf " << endl;
+      cout << "2/ Creation FITSDataSwapper<double> avec lecture depuis swseg.fits" << endl;
       FitsInOutFile si("swseg.fits", FitsInOutFile::Fits_RO);
       si.MoveAbsToHDU(2);
       FITSDataSwapper<double> swin(si, 1);
       SwSegDataBlock<double> swsd(swin, tags, SWSEGSZ);
-      cout <<"7/ Recopie ds SegDataBlock<float> depuis SwSegDataBlock<float> et print" << endl;
+      cout <<"2.b/ Recopie ds SegDataBlock<double> depuis SwSegDataBlock<double> et print" << endl;
       SegDataBlock<double> segd;
       segd = swsd;
@@ -86,24 +92,43 @@
 
     {
-      cout << "8/ Creation SwFitsDataTable sur myswtable.fits " << endl;
+      cout << " ------------------------------------------------ " << endl;
+      cout << "3/ Creation SwFitsDataTable sur myswtable.fits " << endl;
       FitsInOutFile so("!myswtable.fits", FitsInOutFile::Fits_Create);
-      SwFitsDataTable dt(so, 16);
+      SwFitsDataTable dt(so, 45);
       // define table columns
       dt.AddFloatColumn("X0_f");
       dt.AddFloatColumn("X1_f");
       dt.AddDoubleColumn("X0X0pX1X1_d");
-      cout << "8.b/ start fill " << endl;
+      cout << "3.b/ start fill " << endl;
       // Fill the table
       r_8 x[5];
-      for(int i=0; i<63; i++) {
-	if (i < 5)  cout << " DBG - i= " << i << endl;
+      int pmod = NROW/50;
+      if (pmod < 10) pmod = 10;
+      for(int i=0; i<NROW; i++) {
+	//	if (i%pmod == 0)  cout << " DBG - i= " << i << endl;
 	x[0] = (i%9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
 	dt.AddLine(x);
       }
-      cout << "8.c/ End fill " << endl;
+      cout << "3.c/ End fill " << endl;
       
       // Printing table info
       cout << dt ;
+      for(int k = 0; k<NPRT; k++) 
+	cout << "Line[" << k << "] " << dt.LineToString(k) << endl ; 
+     
     }
+    {
+      cout << " ------------------------------------------------ " << endl;
+      cout << "4/ Lecture SwFitsDataTable depuis myswtable.fits " << endl;
+      FitsInOutFile si("myswtable.fits", FitsInOutFile::Fits_RO);
+      si.SkipEmptyFirstHDU();
+      SwFitsDataTable dt(si,40,false);
+      //      si >> dt;
+      // Printing table info
+      cout << dt ;
+      for(int k = 0; k<NPRT; k++) 
+	cout << "Line[" << k << "] " << dt.LineToString(k) << endl ; 
+    }
+
   cout << "============ FIN  test_fdtable ======== ======= " << endl;  
 }
