Index: trunk/AddOn/TAcq/mcrd.cc
===================================================================
--- trunk/AddOn/TAcq/mcrd.cc	(revision 3658)
+++ trunk/AddOn/TAcq/mcrd.cc	(revision 3683)
@@ -63,4 +63,5 @@
 static double LossRate=0.1;
 
+static bool fgraw=true;  // true -> RAW data , false -> FFT data 
 static bool fg4c=false;  // true -> 4 channels (2 fibers)
 static bool fgrdfits=true;  // false -> Don't read fits files, generate paquets
@@ -71,7 +72,7 @@
 int Usage(bool fgshort=true);
 // Pour traitement (calcul FFT et visibilites (ProcA) 1 fibre, 2 voies RAW)
-int Proc1FRawA(string& outname, string& inpath, int jf1, int jf2);
+int Proc1FA(string& outname, string& inpath, int jf1, int jf2);
 // Pour traitement (calcul FFT et visibilites (ProcA,ProcB) 2 fibre, 4 voies RAW)
-int Proc2FRawAB(string& outname, string& path1, string& path2, int jf1, int jf2);
+int Proc2FAB(string& outname, string& path1, string& path2, int jf1, int jf2);
 
 //----------------------------------------------------
@@ -91,8 +92,10 @@
     fgnotrl=false;   // true -> fichier fits SANS Trailer de frame (< mai 2009)
     fghist=false;   // true -> histo des valeurs des time sample
+    fgraw=true;     // raw data 
     if (act.substr(0,2)=="-4") fg4c=true;
     if (act.length()>2) {
       for(size_t ks=2; ks<act.length(); ks++) {
-        if(act[ks]=='g') fgrdfits=false;
+	if (act[ks]=='f') fgraw=false;
+        else if(act[ks]=='g') fgrdfits=false;
         else if(act[ks]=='n') fgnotrl=true; 
         else if(act[ks]=='h') fghist=true; 
@@ -119,7 +122,7 @@
     ResourceUsage resu;
     if (fg4c) 
-      rc =  Proc2FRawAB(outname, inpath, inpath2, imin, imax); 
+      rc =  Proc2FAB(outname, inpath, inpath2, imin, imax); 
     else 
-      rc =  Proc1FRawA(outname, inpath, imin, imax); 
+      rc =  Proc1FA(outname, inpath, imin, imax); 
     cout << resu ; 
   }
@@ -147,5 +150,5 @@
 
 // Pour traitement (calcul FFT et visibilites (ProcA) 1 fibre, 2 voies RAW)
-int Proc1FRawA(string& outname, string& inpath, int imin, int imax)
+int Proc1FA(string& outname, string& inpath, int imin, int imax)
 {
   vector<string> infiles;
@@ -163,4 +166,6 @@
          << " NPaq in file=" << npaqf
          << " PaqSz=" << paqsz << " NMaxZ=" << nmaxz << " NMean=" << NMean << endl;
+    if (fgraw) cout << " ======>  RAW data processing " << endl;
+    else cout << " ======>  FFT data processing " << endl;
   }
   else {
@@ -178,7 +183,7 @@
 
   outname += "/Ch12";
-  BRProcARaw2C proc(mmgr, outname, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
-
-  cout << " mcrd/Proc1FRawA: Starting threads (reader, proc) ... " << endl;
+  BRProcA2C proc(mmgr, outname, fgraw, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
+
+  cout << " mcrd/Proc1FA: Starting threads (reader, proc) ... " << endl;
 
   if (fgrdfits) reader.start();
@@ -187,8 +192,8 @@
   proc.start();
   sleep(1);
-  cout << " mcrd/Proc1FRawA: Waiting for reader thread to finish ... " << endl;
+  cout << " mcrd/Proc1FA: Waiting for reader thread to finish ... " << endl;
   if (fgrdfits) reader.join();
   else pcird.join();
-  cout << " mcrd/Proc1FRawA: Reader finished, waiting for process thread to finish ... " << endl;
+  cout << " mcrd/Proc1FA: Reader finished, waiting for process thread to finish ... " << endl;
   sleep(2);
   mmgr.Stop();
@@ -200,5 +205,5 @@
 
 // Pour traitement (calcul FFT et visibilites (ProcA) 1 fibre, 2 voies RAW)
-int Proc2FRawAB(string& outname, string& path1, string& path2, int imin, int imax) 
+int Proc2FAB(string& outname, string& path1, string& path2, int imin, int imax) 
 {
   vector<string> infiles1;
@@ -216,12 +221,14 @@
     DecodeMiniFitsHeader(infiles1[0],paqsz, npaqf, fgnotrl); 
     nmaxz = infiles1.size()*npaqf/NPaqinZone;
-    cout << " mcrd/Proc2FRawAB/ReadFits: NZones=" << NZones << " NbPaq=" << NPaqinZone 
+    cout << " mcrd/Proc2FAB/ReadFits: NZones=" << NZones << " NbPaq=" << NPaqinZone 
          << " NPaq in file=" << npaqf
          << " PaqSz=" << paqsz << " NMaxZ=" << nmaxz << " NMean=" << NMean << endl;
+    if (fgraw) cout << " ======>  RAW data processing " << endl;
+    else cout << " ======>  FFT data processing " << endl;
   }
   else {
     paqsz = GPaqSz;
     nmaxz = NGenZ;
-    cout << " mcrd/Proc2FRawAB/GeneratePaquets: NZones=" << NZones << " NbPaq=" << NPaqinZone 
+    cout << " mcrd/Proc2FAB/GeneratePaquets: NZones=" << NZones << " NbPaq=" << NPaqinZone 
          << "  PaqSz=" << paqsz << " NMean=" << NMean << endl;
   }
@@ -245,11 +252,11 @@
   string outname1 = outname;
   outname1 += "/Ch12";
-  BRProcARaw2C proc1(mmgr1, outname1, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
+  BRProcA2C proc1(mmgr1, outname1, fgraw, NMean, nmaxz, fghist, NFreqSMap, fgnotrl);
   string outname2 = outname;
   outname2 += "/Ch34";
-  BRProcARaw2C proc2(mmgr2, outname2, NMean, nmaxz, fghist, NFreqSMap, fgnotrl,2);
+  BRProcA2C proc2(mmgr2, outname2, fgraw, NMean, nmaxz, fghist, NFreqSMap, fgnotrl,2);
   string outname12 = outname;
   outname12 += "/Ch1234";
-  BRProcBRaw4C proc12(mmgr1, mmgr2, outname12, NMean, nmaxz, fgnotrl);
+  BRProcB4C proc12(mmgr1, mmgr2, outname12, fgraw, NMean, nmaxz, fgnotrl);
 
   cout << " mcrd/Proc2FRawAB: Starting threads (reader1,2, procA1,2, procAB) ... " << endl;
@@ -302,6 +309,7 @@
     return 1;
   }
-  cout << " ACT= -2[ghn] -> 1 fiber, 2 raw channel processing (ProcA)\n"
-       << " ACT= -4[ghn] -> 2 fibers, 4 raw channels (ProcA, ProcB)\n"
+  cout << " ACT= -2[ghnf] -> 1 fiber, 2 channel processing (ProcA)\n"
+       << " ACT= -4[ghnf] -> 2 fibers, 4 channels (ProcA, ProcB)\n"
+       << "   f FFT data ( raw if not) -> \n" 
        << "   n (notrl) -> FITS files without frame trailer \n" 
        << "   g (generate paquets) -> generate paquets instead of reading fits files\n"
