Index: trunk/AddOn/TAcq/tmtacq.cc
===================================================================
--- trunk/AddOn/TAcq/tmtacq.cc	(revision 3645)
+++ trunk/AddOn/TAcq/tmtacq.cc	(revision 3671)
@@ -29,9 +29,10 @@
 
 
-//--------------------------------------------------------
+//-----------------------------------------------------------------------
 // Programme test acquisition BAORadio multi-thread 
 //  LAL -   R. Ansari Juillet -  2008
 //          M.Taurigna    2009
-//--------------------------------------------------------
+// == Programme reste a la version de Mai 2009 (1er tests Pittsburgh) ==
+//-----------------------------------------------------------------------
 
 
@@ -115,4 +116,5 @@
 static  bool activate_pattern=false;  // true -> on active le pattern du firmware au lieu de la fibre
 static  uint_4 NMaxBloc = 10; 
+static  double nopciLossRate = 0.; // Taux de perte simule des paquets par TestPCIWrapperNODMA 
 //---------------------------- FIN parametres de controle -----------------
 
@@ -178,5 +180,5 @@
   if (fgshort) {
     cout << " Usage: tmtacq CardNum PaquetSize NFrameDMA NFiles NBlocPerFile \n"
-         << "                 NMaxProc DataDirPath [AcqMode] [MemZoneMgr][HardCtlC]" << endl;
+        << "             NMaxProc DataDirPath [AcqMode] [MemZoneMgr] [HardCtlC] [NoPCILossRate]" << endl;
     cout << "   type tmtacq -h for detailed usage " << endl;
     return;
@@ -184,5 +186,5 @@
 
    cout << "\n Usage: tmtacq CardNum PaquetSize NFrameDMA NFiles NBlocPerFile \n"
-        << "                 NMaxProc DataDirPath [AcqMode] [MemZoneMgr][HardCtlC]" << endl;
+        << "             NMaxProc DataDirPath [AcqMode] [MemZoneMgr] [HardCtlC] [NoPCILossRate]" << endl;
    cout << " - CardNum : PCI-Express card number (=1 OR 2 OR 1,2)" << endl;
    cout << " - PaquetSize or FrameSize (=DATA+HDR+TRL_Size)  " << endl;
@@ -209,5 +211,7 @@
    cout << " - MemZoneMgr: nZones,NPaq =Number of Zones and number of paquet \n"
         << "               in each zone (Default=4,128) "<< endl;
-   cout << " -HardCtlC : Y y (direct interrpution by CtrlC ) default (no) " << endl;
+   cout << " - HardCtlC : Y y (direct interrpution by CtrlC ) or no  (default=no) " << endl;
+   cout << " - NoPCILossRate : Simulated NO-PCI loss rate (0<rate<1 default=0.) " << endl;
+
    cout << endl;
    cout << " - AcqMode for previous firmware with 32bits-byteswap"<<endl;
@@ -315,5 +319,5 @@
   }
 
-  nZones = 8;  // Nombre de zones memoires
+  nZones = 4;  // Nombre de zones memoires
   nPaqZone = 128;  // 128 Paquets / zone memoire - valeur par defaut
   if (narg > 9)  { 
@@ -333,4 +337,7 @@
     sigaction(SIGINT,&act,NULL);  	
   }
+
+  nopciLossRate = 0.; // Taux de perte simule des paquets par TestPCIWrapperNODMA 
+  if (narg > 11)  nopciLossRate=atof(arg[11]);
 
   PaqSZ =sizeFrame;  // Taille de paquets 
@@ -360,8 +367,8 @@
   if (acqmode == "nosw")   swapall = BR_Copy ;
   if (acqmode == "nof")  { swapall = BR_Copy ; savesigfits = false; }
-  if (acqmode == "fft1c")  swapall = BR_FFTOneChanNoSwap;
-  if (acqmode == "fft2c")  swapall = BR_FFTTwoChanNoSwap;
-  if (acqmode == "fft1cnof")  { swapall = BR_FFTOneChanNoSwap;  savesigfits = false; }
-  if (acqmode == "fft2cnof")  { swapall = BR_FFTTwoChanNoSwap;  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 == "mono")  { monothr = true;   swapall = BR_Copy; }
   if (acqmode == "patmono")  { monothr = true;   swapall = BR_Copy; activate_pattern=true; }
@@ -370,8 +377,8 @@
 
   if (acqmode == "swapall")  swapall = BR_SwapAll;
-  if (acqmode == "fft1csw")  swapall = BR_FFTOneChan;
-  if (acqmode == "fft2csw")  swapall = BR_FFTTwoChan;
-  if (acqmode == "fft1cswnof")  { swapall = BR_FFTOneChan;  savesigfits = false; }
-  if (acqmode == "fft2cswnof")  { swapall = BR_FFTTwoChan;  savesigfits = false; }
+  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 == "swh") || (acqmode == "mxs") || (acqmode == "monoswh") )  swapall = BR_SwapHDR;
   if ((acqmode == "swapallnof") || (acqmode == "mxs") )  savesigfits = false;
@@ -381,8 +388,8 @@
   if (acqmode == "swap32")   swapall = BR_Swap32 ;
   if (acqmode == "nof32")   { swapall = BR_Swap32 ; savesigfits = false; }
-  if (acqmode == "fft1c32")  swapall = BR_FFTOneChan32;
-  if (acqmode == "fft2c32")  swapall = BR_FFTTwoChan32;
-  if (acqmode == "fft1cnof32")  { swapall = BR_FFTOneChan32;  savesigfits = false; }
-  if (acqmode == "fft2cnof32")  { swapall = BR_FFTTwoChan32;  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; }
 
 }
@@ -398,5 +405,5 @@
   PCIEWrapperInterface* pciwp=NULL;
 #ifdef NOPCIECARD
-  TestPCIWrapperNODMA pciw(PaqSZ);
+  TestPCIWrapperNODMA pciw(PaqSZ,nopciLossRate);
   pciwp = &pciw;
 #else
@@ -494,6 +501,6 @@
 
 #ifdef NOPCIECARD
-  TestPCIWrapperNODMA pciw1(PaqSZ);
-  TestPCIWrapperNODMA pciw2(PaqSZ);
+  TestPCIWrapperNODMA pciw1(PaqSZ,nopciLossRate);
+  TestPCIWrapperNODMA pciw2(PaqSZ,nopciLossRate);
   pciwp1 = &pciw1;
   pciwp2 = &pciw2;
