Index: trunk/AddOn/TAcq/branap.cc
===================================================================
--- trunk/AddOn/TAcq/branap.cc	(revision 3946)
+++ trunk/AddOn/TAcq/branap.cc	(revision 3956)
@@ -16,4 +16,5 @@
 {
   outpath_="./";
+  fgfitsout_=false;
   nmean_=nmean;
   nbloc_=1;
@@ -26,5 +27,6 @@
   nzones_=nzon;
   npaqinzone_=npaqz;
-  fgdatafft_=false;  fgsinglechannel_=false; fgforcesinglechan_=false;
+  fgdatafft_=false;   fgforceraworfft_=false; 
+  fgsinglechannel_=false; fgforcesinglechan_=false;
   prtlevel_=0;
   prtmodulo_=50000;
@@ -64,4 +66,8 @@
       ka+=2;
     }
+    else if (strcmp(arg[ka],"-fitsout")==0) {
+      fgfitsout_=true; 
+      ka++;
+    }
     else if (strcmp(arg[ka],"-nmean")==0) {
       nmean_=atoi(arg[ka+1]);
@@ -101,4 +107,12 @@
     else if (strcmp(arg[ka],"-singlechan")==0) {
       fgsinglechannel_=true; fgforcesinglechan_ = true; 
+      ka++;
+    }
+    else if (strcmp(arg[ka],"-rawdata")==0) {
+      fgforceraworfft_=true; fgdatafft_ = false; 
+      ka++;
+    }
+    else if (strcmp(arg[ka],"-fftdata")==0) {
+      fgforceraworfft_=true; fgdatafft_ = true; 
       ka++;
     }
@@ -166,9 +180,10 @@
 {
   cout << " --- BRAnaParam : Reading/Processing BAORadio FITS files parameters " << endl;
-  cout << " Usage:  prgname [-act ACT] [-out OutPath] [-nmean NMean] [-zones NZones,nPaqinZone] \n" 
+  cout << " Usage:  prgname [-act ACT] [-out OutPath] [-fitsout] \n" 
+       << "                 [-nmean NMean] [-zones NZones,nPaqinZone] \n" 
        << "                 [-nbloc NBloc] [-freq NumFreqMin,NumFreqMax,NBinFreq] \n" 
-       << "                 [-prt lev,modulo] [-nvcal n] [-nthr n] [-nosfc] [-singlechan]\n"
-       << "                 [-freqfilter]\n"
-       << "                 [-gain filename] [-varcut min,max] [-nband nband,first,last] \n"
+       << "                 [-prt lev,modulo] [-nvcal n] [-nthr n] [-nosfc]\n"
+       << "                 [-singlechan] [-fftdata] [-rawdata] \n"
+       << "                 [-freqfilter] [-gain filename] [-varcut min,max] [-nband nband,first,last] \n"
        << "                 [-filldt] [-tspwin wsz,extsz,nfiles] \n" 
        << "         -in Imin,Imax,Istep InPath FiberList [InPath2 FiberList2 InPath3 FiberList3 ...] \n" << endl; 
@@ -178,12 +193,14 @@
   }
   cout << " -act Action: cube3d or vis or viscktt or mspec \n"
-       << "    cube3d: create 3D fits cubes, vis: compute visibilites,  \n" 
-       << "    viscktt: compute visibilities and check TimeTag/FrameCounter\n "
+       << "    cube3d: create 3D fits cubes \n " 
+       << "    vis: compute visibilites (vismfib program) \n" 
+       << "    viscktt: compute visibilities and check TimeTag/FrameCounter (vismfib program)\n "
        << "    mspec: compute and save mean spectra for each channel \n "
        << "    bproc: run BRBaseProcessor for debug/printing (use -prt)  \n "
        << " -out OutPath: Output directory name \n"
+       << " -fitsout : Force FITS format for output files  \n"
        << " -nmean NMean: Number of packet used for spectra/visibility computation \n"
        << " -nbloc NBloc: Number of MemMgr blocs in output file\n"
-       << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone \n" 
+       << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone (RAcqMemZoneMgr) \n" 
        << " -freq NumFreqMin,NumFreqMax,NBinFreq : Frequency zone and number of bins \n" 
        << " -prt lev,modulo : Print level (0,1,2...) and print counter modulo (10000, 50000 ...) \n" 
@@ -192,4 +209,6 @@
        << " -nosfc : Don't force reading with SAME FrameCounter \n" 
        << " -singlechan : Force one channel per fiber \n"
+       << " -rawdata : Force raw data mode (firmware raw) \n"
+       << " -fftdata : Force FFT data mode (firmware fft) \n"
        << " -varcut min,max : min-max cut on variance \n" 
        << " -nband nband,first,last: numbers of freq. bands and first and last bands used for cuts \n"
@@ -212,6 +231,8 @@
   char flnm[1024];
   sprintf(flnm,"%s/signal%d.fits",dirlist_[0].c_str(),imin_);
-  int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_, fgsinglechannel_); 
+  bool fgdatafft_in_fits=false;
+  int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_in_fits, fgsinglechannel_); 
   if(fgforcesinglechan_) fgsinglechannel_= true;
+  if (!fgforceraworfft_) fgdatafft_=fgdatafft_in_fits;
   return rc;
 }
@@ -225,5 +246,5 @@
   cout << " IMin= " << imin_ << " IMax= " << imax_ << " IStep= " << istep_ 
        << ((rdsamefc_)?" SameFrameCounter read mode":" AllOKPaquets read mode ") << endl;
-  cout << " OutPath= " << outpath_ << endl;
+  cout << " OutPath= " << outpath_ << (fgfitsout_?" force FITS output":" PPF output") << endl;
   cout << " Action=" << action_ << "  NMean=" << nmean_ << " NBloc=" << nbloc_ << endl;
   cout << " FreqMin= " << freqmin_ << " FreqMax= " << freqmax_ << " NBinFreq= " << nbinfreq_ << endl;
@@ -237,5 +258,5 @@
   cout << " PaqSize=" << paqsize_ << "  -  NZones=" << nzones_ << " NPaqZone=" << npaqinzone_ 
        << " PrtLevel=" << prtlevel_ << " PrtCntModulo=" <<  prtmodulo_ << endl;
-  cout << " AcqMode: " << ((fgdatafft_)?" Data_FFT " : " Data_Raw " ) 
+  cout << " AcqDataMode: " << ((fgdatafft_)?" Data_FFT " : " Data_Raw " ) 
        << ((fgsinglechannel_)?" SingleChannel " : " TwoChannels " ) << endl;
   cout << " NbVisibCalculator in Group: " <<  nbcalgrp_ << " with N//threads: " << nthreads_ << endl;
