Index: trunk/AddOn/TAcq/brparam.cc
===================================================================
--- trunk/AddOn/TAcq/brparam.cc	(revision 3674)
+++ trunk/AddOn/TAcq/brparam.cc	(revision 3681)
@@ -94,8 +94,12 @@
 
 /* --Methode-- */
-BRParList::BRParList(string fibres,unsigned int paqsz ,unsigned int dmaszkb, 
-		     int nfiles, string acqmod,int nblocfile,int nmxproc ,
-		     string outpath, uint_4 nzon , uint_4 npaqzon, bool fgcntlc)
-{
+BRParList::BRParList(string acqmod, string fibres,unsigned int paqsz, 
+		     unsigned int dmaszkb, int nfiles, int nblocfile,
+		     string outpath, uint_4 nzon , uint_4 npaqzon)
+{
+  AcqMode=acqmod;
+  fgdatafft=false;
+  fgsinglechannel=false;
+
   FiberListS=fibres;
   NbFibers=0;
@@ -103,16 +107,17 @@
   PaqSize=paqsz;
   dmasizekb=dmaszkb;
+
   NbFiles=nfiles;
-  AcqMode=acqmod;
   NBlocPerFile=nblocfile;
-  NMaxProc=nmxproc;
   OutPathName=outpath;
+
   nZones=nzon;
   nPaqZone=npaqzon;
+
   swapall=BR_Copy;
   savesigfits=true;
   fgnulldev4fits=false;
 
-  fg_hard_ctrlc=fgcntlc;
+  fg_hard_ctrlc=false;
 
   fgreducpsize=false;
@@ -123,6 +128,13 @@
 
   skysource="";
+
+  fgdoProc=false;
+  nmeanProc=512;
+  stepProc=5;
+  nmaxProc=0;
+
   monothr=false;
   activate_pattern=false;
+  nopciLossRate=0.;
 
   Decode();    // On decode et on complete les parametres 
@@ -138,16 +150,22 @@
 void BRParList::Set(BRParList const & p)
 {
+  AcqMode=p.AcqMode;
+  fgdatafft=p.fgdatafft;
+  fgsinglechannel=p.fgsinglechannel;
+
   FiberListS=p.FiberListS;
   NbFibers=p.NbFibers;
   for (int fib=0; fib<PMAXNBFIBRES;fib++)  FiberNum[fib]=p.FiberNum[fib];
+
   PaqSize=p.PaqSize;
   dmasizekb=p.dmasizekb;
+
   NbFiles=p.NbFiles;
-  AcqMode=p.AcqMode;
   NBlocPerFile=p.NBlocPerFile;
-  NMaxProc=p.NMaxProc;
   OutPathName=p.OutPathName;
+
   nZones=p.nZones;
   nPaqZone=p.nPaqZone;
+
   swapall=p.swapall;
   savesigfits=p.savesigfits;
@@ -163,7 +181,14 @@
 
   skysource=p.skysource;
+  
+  fgdoProc=p.fgdoProc;
+  nmeanProc=p.nmeanProc;
+  stepProc=p.stepProc;
+  nmaxProc=p.nmaxProc;
 
   monothr=p.monothr;
   activate_pattern=p.activate_pattern;
+
+  nopciLossRate=p.nopciLossRate;
   return;
 }
@@ -188,7 +213,14 @@
     reducoffset=(uint_4)conf.IParam("reducpaqsz",1,0);
   }
-  NMaxProc=conf.IParam("monitor",0,0);
+  if (conf.HasKey("monitor")) {
+    fgdoProc=true;
+    nmeanProc=conf.IParam("monitor",0,512);
+    stepProc=conf.IParam("monitor",1,10);
+    nmaxProc=conf.IParam("monitor",2,0);
+  }
+  nopciLossRate=conf.DParam("nopcilossrate",0,0.);
+
   fg_hard_ctrlc=conf.HasKey("hard_ctrlc");
-
+  if (conf.HasKey("nosavesigfits"))  savesigfits=false;
   Decode();
 }
@@ -212,6 +244,7 @@
   }
   string acqmode = AcqMode;
+  fgdatafft=false;  fgsinglechannel=false;
   reducneedcopy=false;  pqreducmode=BR_TwoChanReduc;
-  if (acqmode == "std")   swapall = BR_Copy ;  
+  if ((acqmode == "std")||(acqmode=="raw2c"))   swapall = BR_Copy ;  
   if (acqmode == "nosw")   swapall = BR_Copy ;
   if (acqmode == "nof")  { swapall = BR_Copy ; savesigfits = false; }
@@ -254,4 +287,11 @@
     { swapall = BR_FFTTwoChanSwap32;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
 
+  if ((swapall==BR_FFTTwoChan)||(swapall==BR_FFTTwoChanSwapAll)||(swapall==BR_FFTTwoChanSwap32)) {
+    fgdatafft=true;  
+  }
+  if ((swapall==BR_FFTOneChan)||(swapall==BR_FFTOneChanSwapAll)||(swapall==BR_FFTOneChanSwap32)) {
+    fgdatafft=true;  fgsinglechannel=true; 
+  }
+  
   if (fgreducpsize) {
     if (redpqsize>=PaqSize) fgreducpsize=false;
@@ -280,4 +320,7 @@
     os << " PaquetSize Reduction, ReducedSize=" << redpqsize << " Offset=" << reducoffset << endl;
   }
+  if (fgdoProc>0) 
+    os << " Monitoring  NMeanProc=" << nmeanProc << " StepProc=" << stepProc << " NMaxProc=" << nmaxProc << endl;
+  else os << " No monotoring thread " << endl;
   os << " fg_hard_ctrlc=" << ((fg_hard_ctrlc)?"true":"false");
   os << " Save to fits " << ((savesigfits)?"true":"false") << endl;
