Index: /trunk/SophyaProg/Tests/Makefile
===================================================================
--- /trunk/SophyaProg/Tests/Makefile	(revision 224)
+++ /trunk/SophyaProg/Tests/Makefile	(revision 224)
@@ -0,0 +1,48 @@
+include $(DPCDEVREP)/Include/Makefile.h
+
+
+ifdef NOSHLIB
+LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libPI.a $(LIB)libPIext.a 
+LIBS = -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz -lm
+ifeq ($(CXX),cxx)
+# librairie des instances de templates cxx
+LIBS := $(LIBS) -lertcxx
+endif
+else
+LIBF =  $(SLB)libtools.so 
+LIBS = -L$(SLB) -lPI -ltools -lm -ldl
+endif
+
+ifndef (NOSHLIB)
+LIBS := $(SLIBS) $(LIBS)
+endif
+
+LDLIBS := $(LIBS) $(LDLIBS)
+
+%:%.cc
+%:%.o
+%.o:%.cc
+%.o:%.c
+%:%.c
+
+.PRECIOUS: $(EXE)% $(OBJ)%.o
+
+%:$(EXE)%
+	echo $@ " done"
+
+$(EXE)%:$(OBJ)%.o
+	$(LINK.cc)  -o $@ $< $(LIBS)
+
+$(OBJ)%.o:%.cc
+	$(COMPILE.cc)   $(USERFLAGS) -o $@ $<
+
+$(EXE)%:$(OBJ)%.cc
+	$(LINK.cc) $(USERFLAGS)  -o $@ $< $(LIBS) 
+
+$(EXE)%:$(OBJ)%.c
+	$(LINK.c)  $(USERFLAGS) -o $@ $< $(LIBS) 
+
+$(OBJ)%.o:%.c
+	$(COMPILE.c) -c $(CFLAGS) $(USERFLAGS) -o $@ $< 
+
+
Index: /trunk/SophyaProg/Tests/piapp.cc
===================================================================
--- /trunk/SophyaProg/Tests/piapp.cc	(revision 224)
+++ /trunk/SophyaProg/Tests/piapp.cc	(revision 224)
@@ -0,0 +1,84 @@
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef OSF1
+#include <dlfcn.h>
+#else
+#define C_NO_SHLIBS
+#endif
+
+#include <string>
+#include "psighand.h"
+#include "dynccd.h"
+
+#include "timing.h"
+#include "piinit.h"
+
+#include "pistdimgapp.h"
+
+
+
+/*  ================================ MAIN() =================================  */
+
+int main(int narg, char *arg[])
+{
+int ofa;
+int fgsig, fgred;
+
+PeidaInteractiveInitiator piinit;
+   
+InitTim();
+
+ofa = 1;   
+if (narg > 1)
+  {
+  if (strcmp(arg[1],"-h") == 0) 
+    {
+    puts("\n piapp: Programme d'analyse interactive ");
+    puts("Usage: piapp [-nored] [-nosig]");
+    exit(0);
+    }
+  }
+
+ofa = 1;
+fgred = fgsig = true;
+if (  (narg > 1) && (strcmp(arg[1],"-nored") == 0) )  { fgred=false;  ofa = 2; }
+if (  (narg > 1) && (strcmp(arg[1],"-nosig") == 0) )  { fgsig=false;  ofa = 2; }
+if (  (narg > 2) && (strcmp(arg[2],"-nored") == 0) )  { fgred=false;  ofa = 3; }
+if (  (narg > 2) && (strcmp(arg[2],"-nosig") == 0) )  { fgsig=false;  ofa = 3; }
+
+
+PIStdImgApp * app = new PIStdImgApp(narg-ofa, arg+ofa);
+if (!fgred) app->RedirectStdOutErr(false);
+else app->RedirectStdOutErr(true);
+if (fgsig)  app->CatchSignals(true);
+
+int rc = 0;
+bool cont = true;
+while(cont) {
+  rc = 0;   cont = false;
+  app->SetReady();
+  if (fgred) app->RedirectStdOutErr(true);
+  TRY {
+  app->Run();
+  }  CATCH(merr) {
+     char ans[32],rep;
+     app->Stop();
+     app->RedirectStdOutErr(false);  
+     fflush(stdout); 
+     cout << endl; 
+     cerr << endl;
+     printf("PIStdImg/main() Exception catched ! = %ld (%s) \n", (long)merr, PeidaExc(merr));
+     printf(" exit <CR> , continue c<CR> , close-windows, continue k<cr> ? ");  gets(ans);
+     rc = merr;
+     rep = toupper(ans[0]);  
+     if ((rep != 'C')||(rep != 'K'))  cont = false;
+     else { cont = true; if (rep == 'K') app->CloseAllWindows(); }
+  } ENDTRY;
+}
+
+app->RedirectStdOutErr(false);  
+delete app;
+printf("piapp : Exiting .... Rc= %d \n", rc); 
+exit(rc);
+}
+
Index: /trunk/SophyaProg/Tests/tblitz.cc
===================================================================
--- /trunk/SophyaProg/Tests/tblitz.cc	(revision 224)
+++ /trunk/SophyaProg/Tests/tblitz.cc	(revision 224)
@@ -0,0 +1,58 @@
+#include <stdio.h>
+#include <iostream.h>
+#include "nbrandom.h"
+#include "timing.h"
+#include "cimage.h"
+
+#include "blitz/array.h"
+using namespace blitz ;
+
+main(int narg, char *arg[])
+{
+PeidaInit();
+InitTim();
+
+char strg[128];
+int N1,N2, k, kk, i, j;
+N1 = 1;
+N2 = 10;
+if (narg > 1)  N1 = atoi(arg[1]);
+if (narg > 2)  N2 = atoi(arg[2]);
+
+cout << N1 << " Tests avec " << N2 << " multiplications" << endl; 
+
+int sx = 300;
+int sy = 200;
+
+ImageR4  img(sx, sy), i2(sx, sy), ir(sx, sy);
+for(kk=0; kk<N1; kk++) {
+  cout << kk << " - Remplissage image (" << sx << "x" << sy << ") , " << N2 << " mult. " << endl;
+  for(i=0; i<sx; i++)
+    for(j=0; j<sy; j++) img(i,j) = frand01()*10.*j+20.*i;
+  for(i=0; i<sx; i++)
+    for(j=0; j<sy; j++) i2(i,j) =  frand01()*10.*j+20.*i;
+
+  for(k=0; k<N2; k++) ir = img * i2;
+  sprintf(strg, "Img T[%d] ", kk);
+  PrtTim(strg);
+}
+
+
+ cout << "\n ====  Test avec Blitz++ " << endl;
+
+Array<float,2> a1(sy, sx), a2(sy, sx), a3(sy, sx);
+firstIndex ii;
+secondIndex jj;
+
+for(kk=0; kk<N1; kk++) {
+  cout << kk << " BlitzArray (" << sx << "x" << sy << ") , " << N2 << " mult. " << endl;
+  a1 = frand01()*10.*jj+20.*ii;
+  a2 = frand01()*10.*jj+20.*ii;
+  for(k=0; k<N2; k++) a3 = a1*a2;
+  sprintf(strg, "Blitz-Array T[%d] ", kk);
+  PrtTim(strg);
+}
+
+
+exit(0);
+}
Index: /trunk/SophyaProg/Tests/timg.cc
===================================================================
--- /trunk/SophyaProg/Tests/timg.cc	(revision 224)
+++ /trunk/SophyaProg/Tests/timg.cc	(revision 224)
@@ -0,0 +1,61 @@
+// Utilisation des flots d'entree-sortie C++
+#include <iostream.h>
+// Utilisation de la classe Image<T>
+#include "cimage.h"
+// Utilisation des generateurs aleatoires
+#include "nbrandom.h"
+
+
+// -------- Le programme principal ---------
+
+main(int narg, char *arg[])
+{
+int i,j;
+
+// ----- ATTENTION -------
+// Initialisation de Peida
+// A faire au debut de main()
+PeidaInit();
+
+cout << " ........ Debut de timg.cc ....... " << endl;
+// declaration et creation d'une image de type flottant 300x200
+ImageR4  img(300, 200);
+// Remplissage de l'image Tirage aleatoire plat entre 1000-2000
+for(i=0; i<300; i++)
+  for(j=0; j<200; j++) img(i,j) =  frand01()*1000.+1000.;
+// Verification de la dynamique de l'image
+img.CheckDyn();
+img.Print();
+// On sauve l'image ds img.ppf (fichier  format PPersist)
+img.Write("img.ppf");
+
+// On rajoute du bruit a l'image (Gaussienne de sigma=3)
+for(i=0; i<300; i++)
+  for(j=0; j<200; j++) img(i,j) += NorRand()*3. ;
+
+// Verification de la dynamique de l'image
+img.CheckDyn();
+img.Print();
+
+// On verifie la date de creation du fichier .ppf
+  {
+  string ppfname = "img.ppf";
+  PInPersist pin(ppfname, false);
+  cout << "Fichier PPF: " << ppfname << " Version= " << pin.Version() 
+       << " Created: " << pin.CreationDate() << endl;
+  }
+// On cree une nouvelle image 
+ImageR4  img2;
+// On lit le contenu du fichier imgin.ppf
+img2.Read("img.ppf");
+// On calcule la difference entre les images img et img2
+//    Apres et avant ajout de bruit
+img -= img2;
+
+// Verification de la dynamique de l'image soustraite
+img.CheckDyn();
+img.Print();
+
+cout << " ========= Fin de timg.cc ======== " << endl;
+exit(0);
+}
Index: /trunk/SophyaProg/Tests/tnt.cc
===================================================================
--- /trunk/SophyaProg/Tests/tnt.cc	(revision 224)
+++ /trunk/SophyaProg/Tests/tnt.cc	(revision 224)
@@ -0,0 +1,60 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <iostream.h>
+
+#include "ntuple.h"
+
+int main(int, char **)
+{
+PeidaInit();
+
+char * names[3] = {"XPos", "YPos", "Val"};
+int i,j, k;
+float xnt[3];
+
+printf("Creation Ntuple avec X,Y,Val ... \n");
+NTuple  nt1(3, names, 20);
+
+k = 0;
+for(j=0; j<8; j++)
+  for(i=0; i<12; i++)
+    { xnt[0] = i+0.5;  xnt[1] = j+0.5;  xnt[2] = k;
+    nt1.Fill(xnt); k++; }
+
+nt1.Show(cout);
+nt1.Print(0, 5);
+nt1.Print(18, 5);
+nt1.Print(94, 5);
+
+printf("Ecriture NTuple ds nt.ppf ... \n");
+nt1.Write("nt.ppf");
+
+printf("Lecture NTuple (nt2) ds nt.ppf ... \n");
+
+NTuple nt2("nt.ppf");
+nt2.Show(cout);
+nt2.Print(0, 5);
+nt2.Print(18, 5);
+nt2.Print(94, 5);
+
+printf("ReLecture NTuple (nt1) ds nt.ppf ... \n");
+
+nt1.Read("nt.ppf");
+nt1.Show(cout);
+nt1.Print(0, 5);
+nt1.Print(18, 5);
+nt1.Print(94, 5);
+
+printf("Creation/Lecture Lecture NTuple (nt1) ds nt.ppf ... \n");
+NTuple nt3;
+nt3.Read("nt.ppf");
+nt3.Show(cout);
+nt3.Print(0, 5);
+nt3.Print(18, 5);
+nt3.Print(94, 5);
+
+exit(0);
+}
+
+
