Index: /trunk/ArchTOIPipe/Processors/nooppr.cc
===================================================================
--- /trunk/ArchTOIPipe/Processors/nooppr.cc	(revision 1487)
+++ /trunk/ArchTOIPipe/Processors/nooppr.cc	(revision 1487)
@@ -0,0 +1,110 @@
+#include "toimanager.h"
+#include "nooppr.h"
+// ----------------------------------------------------------------------
+//   Classe SimpleFourierFilter : Filtre simple ds le domaine de Fourier
+// ----------------------------------------------------------------------
+
+NoOpProcessor::NoOpProcessor(int wsz)
+{
+  wsize = wsz;
+  totnscount = 0;
+}
+
+
+
+void NoOpProcessor::PrintStatus(ostream & os)
+{
+  os << "\n ------------------------------------------------------ \n" 
+     << " NoOpProcessor::PrintStatus() - WindowSize=" 
+     << WSize() << endl; 
+  TOIProcessor::PrintStatus(os);
+  os << " ------------------------------------------------------ " << endl;
+}
+
+void NoOpProcessor::init() {
+  cout << "NoOpProcessor::init" << endl;
+  declareInput("in");
+  declareOutput("out");
+  declareOutput("incopie");
+  name = "NoOpProcessor";
+  //  upExtra = 1;
+}
+
+
+void NoOpProcessor::run() {
+  //  TOIManager* mgr = TOIManager::getManager();
+  int snb = getMinIn();
+  int sne = getMaxIn();
+
+  bool fgout = checkOutputTOIIndex(0);
+  bool fgincopie = checkOutputTOIIndex(1);
+
+  if (!checkInputTOIIndex(0)) {
+    cerr << " NoOpProcessor::run() - Input TOI (in) not connected! "
+	 << endl;
+    throw ParmError("NoOpProcessor::run() Input TOI (in) not connected!");
+  }
+
+
+  cout << " NoOpProcessor::run() SNRange=" << snb << " - " << sne << endl; 
+  
+  double * vin = NULL;
+  double * vout = NULL;
+  int_8 * vfg = NULL;
+  try {
+    // Le debut
+    int k,i,klast;
+    int nks = 0;
+    klast = snb-1;
+    int totnbblock = 0;
+    
+    if (wsize > 1) {
+      vin = new double[wsize];
+      vout = new double[wsize];
+      vfg = new int_8[wsize];
+    
+      // Boucle sur les sampleNum
+      // 1er partie, on traite par paquets de wsize
+      for(k=snb;k<=sne-wsize+1;k+=wsize) {
+	for(i=0; i<wsize; i++) 
+	  getData(0, k+i, vin[i], vfg[i]);
+	totnbblock++;
+	for(i=0; i<wsize; i++) {
+	  if (fgout) 
+	    putData(0,k+i,vout[i],vfg[i]);
+	  if (fgincopie)  
+	    putData(1, k+i, vin[i], vfg[i]);
+	}
+      }
+      klast+=wsize;
+      totnscount+=wsize;
+    }
+
+    // 2eme partie, on traite la fin du bloc d'echantillons si necessaire
+    double inval;
+    int_8 inflg;
+    if (klast < sne) 
+      for(k=klast+1; k<=sne; k++) {
+	getData(0, k, inval, inflg);
+	if (fgout) putData(0, k, inval, inflg);
+	if (fgincopie) 
+	  putData(1, k, inval, inflg);
+	totnscount++;
+      }
+
+    totnbblock++;
+
+    cout << " NoOpProcessor::run() - End of processing " 
+	 << " NbFFTBlocks= " << totnbblock << endl;
+  }  // Bloc try 
+
+  catch (PException & exc) {
+    cerr << "NoOpProcessor: Catched Exception " << (string)typeid(exc).name()
+         << "\n .... Msg= " << exc.Msg() << endl;
+  }
+
+  if (vin) delete[] vin; 
+  if (vout) delete[] vout;
+  if (vfg) delete[] vfg;  
+
+}
Index: /trunk/ArchTOIPipe/Processors/nooppr.h
===================================================================
--- /trunk/ArchTOIPipe/Processors/nooppr.h	(revision 1487)
+++ /trunk/ArchTOIPipe/Processors/nooppr.h	(revision 1487)
@@ -0,0 +1,29 @@
+// This may look like C code, but it is really -*- C++ -*-
+
+#ifndef NOOPPR_H
+#define NOOPPR_H
+
+#include "toiprocessor.h"
+
+//  Un processeur qui ne fait rien !
+//  Peut introduire un delai de wsize
+
+class NoOpProcessor : public TOIProcessor {
+public:
+                NoOpProcessor(int wsz=0);  
+  //		~NoOpProcessor();
+
+  inline int	WSize() const { return wsize; }
+  inline int_8	ProcessedSampleCount() const { return totnscount; }
+
+  virtual void  PrintStatus(ostream & os) ; // const plus tard
+
+  virtual void	init();  
+  virtual void	run();
+
+protected:
+  int_8 totnscount;   // Nombre total d'echantillon processe
+  int wsize;         // Taille de fenetre de travail
+};
+
+#endif
Index: /trunk/ArchTOIPipe/SMakefile
===================================================================
--- /trunk/ArchTOIPipe/SMakefile	(revision 1486)
+++ /trunk/ArchTOIPipe/SMakefile	(revision 1487)
@@ -13,14 +13,14 @@
             $(AOBJ)toi.o $(AOBJ)toimanager.o $(AOBJ)toiprocessor.o \
             $(AOBJ)toisqfilter.o $(AOBJ)toiregwindow.o $(AOBJ)toiseqbuff.o \
-            $(AOBJ)simtoipr.o $(AOBJ)map2toi.o $(AOBJ)toi2map.o
+            $(AOBJ)simtoipr.o $(AOBJ)map2toi.o $(AOBJ)toi2map.o $(AOBJ)nooppr.o
 EXEOLIST := $(AOBJ)fits2asc.o $(AOBJ)tsttoi.o $(AOBJ)tsttoi2.o $(AOBJ)simtst.o \
             $(AOBJ)tstrztoi.o $(AOBJ)rztoi.o \
             $(AOBJ)fits2ascii.o $(AOBJ)tstmap2toi.o $(AOBJ)tsttoi2map.o 
-EXELIST := $(AOBJ)sfftc $(AOBJ)simtst $(AOBJ)tstrztoi $(AOBJ)fits2asc $(AOBJ)tsttoi \
+EXELIST := $(AOBJ)sfftc $(AOBJ)simtst $(AOBJ)mesovh $(AOBJ)tstrztoi $(AOBJ)fits2asc $(AOBJ)tsttoi \
            $(AOBJ)tsttoi2 $(AOBJ)fits2ascii $(AOBJ)tstmap2toi $(AOBJ)tsttoi2map
 
 INCLIST := asciitoiwtr.h fitstoirdr.h fitstoiwtr.h toi.h config.h conf.h \
            toiprocessor.h toimanager.h toiseqbuff.h toiregwindow.h \
-           simtoipr.h map2toi.h toi2map.h
+           simtoipr.h map2toi.h toi2map.h nooppr.h
 
 all : $(EXELIST) 
@@ -43,4 +43,6 @@
 $(AOBJ)sfftc: $(AOBJ)sfftc.o  $(LIBOLIST)
 	$(LINK.cc)  -o $@ $^ $(LIBS)
+$(AOBJ)mesovh: $(AOBJ)mesovh.o  $(LIBOLIST)
+	$(LINK.cc)  -o $@ $^ $(LIBS)
 $(AOBJ)simtst: $(AOBJ)simtst.o  $(LIBOLIST)
 	$(LINK.cc)  -o $@ $^ $(LIBS)
@@ -60,4 +62,5 @@
 $(AOBJ)simtst.o: simtst.cc $(INCLIST)
 $(AOBJ)sfftc.o: sfftc.cc $(INCLIST)
+$(AOBJ)mesovh.o: mesovh.cc $(INCLIST)
 $(AOBJ)tstrztoi.o: tstrztoi.cc rztoi.h $(INCLIST)
 $(AOBJ)rztoi.o: rztoi.cc rztoi.h $(INCLIST)
@@ -87,2 +90,3 @@
 $(AOBJ)map2toi.o: map2toi.cc map2toi.h 
 $(AOBJ)toi2map.o: toi2map.cc toi2map.h 
+$(AOBJ)nooppr.o: nooppr.cc nooppr.h 
Index: /trunk/ArchTOIPipe/TestPipes/mesovh.cc
===================================================================
--- /trunk/ArchTOIPipe/TestPipes/mesovh.cc	(revision 1487)
+++ /trunk/ArchTOIPipe/TestPipes/mesovh.cc	(revision 1487)
@@ -0,0 +1,200 @@
+/*   mesure de performance de l'architecture
+
+----------------   Exemple d'appel  ---------------------
+csh> mesovh -start 104385384 -end 104399964 
+            -intoi boloMuV_27 -wtoi 8192 -wnoop 4096 inputbolo.fits 
+*/
+
+
+
+#include "machdefs.h"
+#include <math.h>
+#include "array.h"
+#include <unistd.h>
+#include <stdexcept>
+#include "toi.h"
+#include "toiprocessor.h"
+#include "fitstoirdr.h"
+#include "fitstoiwtr.h"
+#include "toimanager.h"
+#include "nooppr.h"
+#include "toiseqbuff.h"
+#include "timing.h"
+// #include "sambainit.h"
+
+void Usage(bool fgerr)
+{
+  cout << endl;
+  if (fgerr) {
+    cout << " mesovh : Argument Error ! mesovh -h for usage " << endl; 
+    exit(1);
+  }
+  else {
+    cout << "\n Usage : mesovh [-dbg] [-start snb] [-end sne] \n" 
+	 << "         [-wtoi sz] [-wnoop sz] [-bipro] inFitsName \n"
+	 << "   -dbg : sets TOISeqBuffered debug level to 1 \n"
+	 << "   -start snb : sets the start sample num \n"
+	 << "   -end sne : sets the end sample num \n"
+	 << "   -intoi toiName : select input TOI name (def boloMuV_27)\n"
+	 << "   -wtoi sz : sets TOISeqBuff buffer size (def= 8192)\n"
+	 << "   -wnoop sz : sets NoOpProcessor window size \n"
+	 << "   -bipro : chain 2 processors \n"
+	 << endl;
+    exit(0);
+  }
+}
+
+int main(int narg, char** arg) {
+
+  if ((narg > 1) && (strcmp(arg[1],"-h") == 0) ) Usage(false);
+
+  cout << "mesovh starting - Decoding arguments " << " narg=" << narg << endl;
+
+  bool fgdbg = false;
+  bool fgbipro = false;
+  bool fgsetstart = false;
+  int wtoi = 8192;
+  int wnoop = 0;
+  int keepfft = 0;
+  int nmax = 10;
+  int istart = 0;
+  int iend = 0;
+  string infile;
+  string outfile;
+  string outppfname;
+  string intoi = "boloMuV_27";
+
+  if (narg < 4) Usage(true);
+  int ko=1;
+  // decoding arguments 
+  for(int ia=1; ia<narg; ia++) {
+    if (strcmp(arg[ia],"-start") == 0) {
+      if (ia == narg-1) Usage(true);  // -start est suivi d'un argument 
+      istart = atoi(arg[ia+1]); ia++;
+      fgsetstart = true;
+    }    
+    else if (strcmp(arg[ia],"-end") == 0) {
+      if (ia == narg-1) Usage(true);  
+      iend = atoi(arg[ia+1]); ia++;
+    }    
+    else if (strcmp(arg[ia],"-wtoi") == 0) {
+      if (ia == narg-1) Usage(true);  
+      wtoi = atoi(arg[ia+1]); ia++;
+    }    
+    else if (strcmp(arg[ia],"-wnoop") == 0) {
+      if (ia == narg-1) Usage(true);  
+      wnoop = atoi(arg[ia+1]); ia++;
+    }    
+    else if (strcmp(arg[ia],"-keepfft") == 0) {
+      if (ia == narg-1) Usage(true);  
+      keepfft = atoi(arg[ia+1]); ia++;
+    }    
+    else if (strcmp(arg[ia],"-intoi") == 0) {
+      if (ia == narg-1) Usage(true);  
+      intoi = arg[ia+1]; ia++;
+    }    
+    else if (strcmp(arg[ia],"-bipro") == 0)  fgbipro = true;
+    else if (strcmp(arg[ia],"-dbg") == 0)  fgdbg = true;
+
+    else { ko = ia; break; }  // Debut des noms
+  }
+
+  if (iend < istart) iend = istart+wtoi*(nmax+5);
+  if ((narg-ko) < 1)  Usage(true); 
+  infile = arg[ko];
+  //  outfile = arg[ko+1];
+  //  outppfname = arg[ko+2];
+
+  //  cout << " Initializing SOPHYA ... " << endl;
+  //  SophyaInit();
+  InitTim();
+
+  cout << ">>>> mesovh: Infile= " << infile << " outFile=" 
+       << outfile << endl; 
+  cout << ">>>> Window Size WTOI= " << wtoi << " WNOOP= " << wnoop
+       << "  iStart= " << istart << " iEnd= " << iend << endl;
+  cout << ">>>> InTOIName= " << intoi << endl;
+
+  try {
+    TOIManager* mgr = TOIManager::getManager();
+  
+    //  mgr->setRequestedSample(11680920,11710584);
+    //  mgr->setRequestedSample(104121000, 104946120);
+    if (fgsetstart) 
+      mgr->setRequestedSample(istart, iend);
+  
+    //    FITSTOIReader r("/data/Archeops/bolo11.fits); 
+    FITSTOIReader r(infile); 
+    cout << "reader created" << endl;
+    //    FITSTOIWriter w("/data/Archeops/rz.fits");
+    //    FITSTOIWriter w(outfile);
+    //    cout << "fits writer created" << endl;
+
+
+    int w1 = wtoi;
+    TOISeqBuffered * toiin = new TOISeqBuffered("f2in", w1);
+    if (fgdbg) toiin->setDebugLevel(1);
+    //    TOISeqBuffered * toiout = new TOISeqBuffered("out", w1);
+    //    if (fgdbg) toiout->setDebugLevel(1);
+    //    TOISeqBuffered * toiincopie = new TOISeqBuffered("incopie", w1);
+    //    if (fgdbg) toiincopie->setDebugLevel(1);
+    
+  
+    cout << " Connecting to FitsReader ... " << endl;
+    r.addOutput(intoi, toiin);
+
+    NoOpProcessor noop(wnoop);
+    NoOpProcessor noop2(wnoop);
+    cout << " Connecting NoOpProcessor ... " << endl;
+    noop.addInput("in",toiin);
+    
+    TOISeqBuffered * toi2 = NULL;
+    if (fgbipro) {
+      toi2 = new TOISeqBuffered("toi2", w1);
+      noop.addOutput("out", toi2);
+      noop2.addInput("in",toi2);
+    }
+
+    PrtTim("starting threads");
+    r.start();
+    noop.start();
+    if (fgbipro)  noop2.start();
+    /*   
+    for(int jj=0; jj<3; jj++) {
+      cout << *toiin; 
+      cout << *toiout; 
+      cout << *toiincopie; 
+      sleep(1);
+    }
+    */
+    
+    
+
+    mgr->joinAll();
+    PrtTim("End threads");
+
+    //    cout << " ------ FITSReaderTOI::PrintStatus() : ----- " << endl;
+    //    r.PrintStatus(cout);  
+    //    cout << "----- FITSWriterTOI::PrintStatus() : ----- " << endl;
+    //    w.PrintStatus(cout);  
+
+    cout << " ------ toiin, toiout and toiincopie Status information ------- " << endl;
+    cout << *toiin; 
+    if (fgbipro) cout << *toi2; 
+    cout << noop ; 
+    if (fgbipro) cout << noop2 ; 
+  }
+  catch (PThrowable & exc) {
+    cerr << "\n mesovh: Catched Exception \n" << (string)typeid(exc).name() 
+	 << " - Msg= " << exc.Msg() << endl;
+  }
+  catch (const std::exception & sex) {
+    cerr << "\n mesovh: Catched std::exception \n" 
+	 << (string)typeid(sex).name() << endl; 
+  }
+  catch (...) {
+    cerr << "\n mesovh: some other exception was caught ! " << endl;
+  }
+
+  return(0);
+}
