Index: trunk/AddOn/TAcq/brparam.cc
===================================================================
--- trunk/AddOn/TAcq/brparam.cc	(revision 3673)
+++ trunk/AddOn/TAcq/brparam.cc	(revision 3674)
@@ -63,4 +63,12 @@
 
 /* --Methode-- */
+void BRConfList::SetBaseDirectory(string basedir)
+{
+  basedir_=basedir;
+  size_t len = basedir_.length();
+  if ((len>1)&&(basedir_[len-1]!='/')) basedir_ += '/';
+}
+
+/* --Methode-- */
 void BRConfList::Set(BRConfList const & cf)
 {
@@ -86,5 +94,5 @@
 
 /* --Methode-- */
-BRParList::BRParList(string fibres,unsigned int paqsz ,unsigned int nframeDMA, 
+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)
@@ -94,5 +102,5 @@
   for (int fib=0; fib<PMAXNBFIBRES;fib++)  FiberNum[fib]=0;
   PaqSize=paqsz;
-  nbFrameDMA=nframeDMA;
+  dmasizekb=dmaszkb;
   NbFiles=nfiles;
   AcqMode=acqmod;
@@ -105,10 +113,14 @@
   savesigfits=true;
   fgnulldev4fits=false;
+
   fg_hard_ctrlc=fgcntlc;
+
   fgreducpsize=false;
+  reducneedcopy=false;
   pqreducmode=BR_CopyRA;
   redpqsize=PaqSize;
   reducoffset=0;
 
+  skysource="";
   monothr=false;
   activate_pattern=false;
@@ -130,5 +142,5 @@
   for (int fib=0; fib<PMAXNBFIBRES;fib++)  FiberNum[fib]=p.FiberNum[fib];
   PaqSize=p.PaqSize;
-  nbFrameDMA=p.nbFrameDMA;
+  dmasizekb=p.dmasizekb;
   NbFiles=p.NbFiles;
   AcqMode=p.AcqMode;
@@ -145,8 +157,11 @@
 
   fgreducpsize=p.fgreducpsize;
+  reducneedcopy=p.reducneedcopy;
   pqreducmode=p.pqreducmode;
   redpqsize=p.redpqsize;
   reducoffset=p.reducoffset;
 
+  skysource=p.skysource;
+
   monothr=p.monothr;
   activate_pattern=p.activate_pattern;
@@ -158,15 +173,21 @@
 {
   DataCards conf(file);
-  FiberListS= conf.SParam("Fibres",0,"1");
-  PaqSize=(unsigned int)conf.IParam("PaqSZ",0,16424);
-  nbFrameDMA =(unsigned int) conf.IParam("nbFrameDma",0,32);
-  NbFiles=conf.IParam("NbFiles",0,1);
-  NBlocPerFile=conf.IParam("NBlocPerFile",0,10);
-  NMaxProc=conf.IParam("NMaxProc",0,0);
-  OutPathName= conf.SParam("OutPathName",0,"TstAcq");
+  FiberListS= conf.SParam("fibres",0,"1");
+  OutPathName= conf.SParam("outpathname",0,"TstAcq");
+  skysource= conf.SParam("skysource",0,"");
+  PaqSize=(uint_4)conf.IParam("paqsize",0,16424);
+  dmasizekb =(uint_4) conf.IParam("dmasizekb",0,32);
+  NbFiles=conf.IParam("nbfiles",0,1);
+  NBlocPerFile=conf.IParam("nblocperfile",0,10);
   AcqMode =conf.SParam("acqmode",0,"std");
-  nZones=(unsigned int)conf.IParam("nZones",0,4);
-  nPaqZone=(uint_4)conf.IParam("nPaqZone",0,128);
-  fg_hard_ctrlc=conf.HasKey("fg_hard_ctrlc");
+  nZones=(uint_4)conf.IParam("memmgr",0,4);
+  nPaqZone=(uint_4)conf.IParam("memmgr",1,128);
+  if (conf.HasKey("reducpaqsz")) {  // reduction des tailles de paquets
+    fgreducpsize=true;
+    redpqsize=(uint_4)conf.IParam("reducpaqsz",0,PaqSize/4);
+    reducoffset=(uint_4)conf.IParam("reducpaqsz",1,0);
+  }
+  NMaxProc=conf.IParam("monitor",0,0);
+  fg_hard_ctrlc=conf.HasKey("hard_ctrlc");
 
   Decode();
@@ -191,11 +212,14 @@
   }
   string acqmode = AcqMode;
-  if (acqmode == "std")  swapall = BR_Copy ;
+  reducneedcopy=false;  pqreducmode=BR_TwoChanReduc;
+  if (acqmode == "std")   swapall = BR_Copy ;  
   if (acqmode == "nosw")   swapall = BR_Copy ;
   if (acqmode == "nof")  { swapall = BR_Copy ; savesigfits = false; }
-  if (acqmode == "fft1c")  swapall = BR_FFTOneChan;
-  if (acqmode == "fft2c")  swapall = BR_FFTTwoChan;
-  if (acqmode == "fft1cnof")  { swapall = BR_FFTOneChan;  savesigfits = false; }
-  if (acqmode == "fft2cnof")  { swapall = BR_FFTTwoChan;  savesigfits = false; }
+  if (acqmode == "fft1c")  { swapall = BR_FFTOneChan; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0; }
+  if (acqmode == "fft2c")  { swapall = BR_FFTTwoChan;  reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
+  if (acqmode == "fft1cnof")  
+    { swapall = BR_FFTOneChan;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0;  }
+  if (acqmode == "fft2cnof")  
+    { swapall = BR_FFTTwoChan;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
   if (acqmode == "mono")  { monothr = true;   swapall = BR_Copy; }
   if (acqmode == "monodirect")  { monothr = true;  swapall =  BR_CopyHDR;}
@@ -206,8 +230,12 @@
 
   if (acqmode == "swapall")  swapall = BR_SwapAll;
-  if (acqmode == "fft1csw")  swapall = BR_FFTOneChanSwapAll;
-  if (acqmode == "fft2csw")  swapall = BR_FFTTwoChanSwapAll;
-  if (acqmode == "fft1cswnof")  { swapall = BR_FFTOneChanSwapAll;  savesigfits = false; }
-  if (acqmode == "fft2cswnof")  { swapall = BR_FFTTwoChanSwapAll;  savesigfits = false; }
+  if (acqmode == "fft1csw") 
+    { swapall = BR_FFTOneChanSwapAll;  reducneedcopy=true;  pqreducmode=BR_OneChanReducK0; }
+  if (acqmode == "fft2csw") 
+    { swapall = BR_FFTTwoChanSwapAll;  reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
+  if (acqmode == "fft1cswnof")  
+    { swapall = BR_FFTOneChanSwapAll;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0; } 
+  if (acqmode == "fft2cswnof")  
+    { swapall = BR_FFTTwoChanSwapAll;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
   if ((acqmode == "swh") || (acqmode == "mxs") || (acqmode == "monoswh") )  swapall = BR_SwapHDR;
   if ((acqmode == "swapallnof") || (acqmode == "mxs") )  savesigfits = false;
@@ -217,8 +245,19 @@
   if (acqmode == "swap32")   swapall = BR_Swap32 ;
   if (acqmode == "nof32")   { swapall = BR_Swap32 ; savesigfits = false; }
-  if (acqmode == "fft1c32")  swapall = BR_FFTOneChanSwap32;
-  if (acqmode == "fft2c32")  swapall = BR_FFTTwoChanSwap32;
-  if (acqmode == "fft1cnof32")  { swapall = BR_FFTOneChanSwap32;  savesigfits = false; }
-  if (acqmode == "fft2cnof32")  { swapall = BR_FFTTwoChanSwap32;  savesigfits = false; }
+  if (acqmode == "fft1c32")  
+    { swapall = BR_FFTOneChanSwap32; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0; }
+  if (acqmode == "fft2c32")  
+    { swapall = BR_FFTTwoChanSwap32; reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
+  if (acqmode == "fft1cnof32")  
+    { swapall = BR_FFTOneChanSwap32;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_OneChanReducK0; }
+  if (acqmode == "fft2cnof32")  
+    { swapall = BR_FFTTwoChanSwap32;  savesigfits = false; reducneedcopy=true;  pqreducmode=BR_TwoChanReducK0; }
+
+  if (fgreducpsize) {
+    if (redpqsize>=PaqSize) fgreducpsize=false;
+    else {
+      if(reducoffset>(PaqSize-redpqsize)/2) reducoffset=(PaqSize-redpqsize)/2;
+    }
+  }
 }
 
@@ -229,12 +268,16 @@
   os << " FiberListS=" << FiberListS ;
   os << " PaqSize=" <<PaqSize;
-  os << " nbFrameDMA=" <<nbFrameDMA << endl;
+  os << " DMA_Size_kb=" <<dmasizekb << endl;
   os << " AcqMode="<<AcqMode;
   os << " Type of acquisition :" << BRPaquet::FmtConvToString( swapall) << endl;
+  os << " SkySource=" << skysource;
   os << " NbFiles="<<NbFiles;
   os << " NBlocPerFile="<<NBlocPerFile;
   os << " OutPathName="<<OutPathName << endl;
   os << " MemMgr: nZones="<<nZones;
-  os << " nPaqZone="<<nPaqZone;
+  os << " nPaqZone="<<nPaqZone<<endl;
+  if (fgreducpsize) {
+    os << " PaquetSize Reduction, ReducedSize=" << redpqsize << " Offset=" << reducoffset << endl;
+  }
   os << " fg_hard_ctrlc=" << ((fg_hard_ctrlc)?"true":"false");
   os << " Save to fits " << ((savesigfits)?"true":"false") << endl;
