Changeset 3640 in Sophya for trunk/AddOn/TAcq/mcrd.cc


Ignore:
Timestamp:
May 27, 2009, 5:15:45 PM (16 years ago)
Author:
ansari
Message:

Correction et ameliorations multiples - en particulier mcrd.cc, brproc.cc et brfitsrd.cc, Reza 27/05/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/mcrd.cc

    r3639 r3640  
    5959  if (narg < 4) {
    6060    cout << " --- Reading/Processing BAORadio FITS files" << endl;
    61     cout << " Usage:  mcrd ACT OutPPF -infits DirName Imin Imax " << endl;
     61    cout << " Usage:  mcrd ACT OutPPF -infits DirName Imin Imax [NZones,NbPaqinZone] " << endl;
    6262    cout << " ACT= notrl FITS files without frame trailer \n"
    6363         << " OutPPF : Output PPF file name (without .ppf)" << endl;
    6464    cout << " -infiles DirName Imin Imax : Input fits directory and sequence numbers \n"
    65          << "    FileNames=DirName/signalII.fits Imin<=II<=Imax " << endl; 
     65         << "    FileNames=DirName/signalII.fits Imin<=II<=Imax \n"
     66         << " - NZones,NbPaqinZone : Number of Zones and number of paquets in one zone\n"
     67         << "     of the RAcqMemZoneMgr memory manager (default = 4,128) " << endl;
    6668    return 1;
    6769  }
     
    8688      infiles.push_back(nbuff);
    8789    }
     90    int nzones = 4;
     91    int npaqz = 128;
     92    if (narg>7) sscanf(arg[7],"%d,%d",&nzones,&npaqz); 
    8893
    8994    cout << " ---------- mcrd.cc Start - ACT= " << act << " ------------- " << endl;
     
    9297    if (act=="notrl") fgnotrl=true;  // fichier fits SANS trailer
    9398
    94     uint_4 paqsz, npaq;
    95     DecodeMiniFitsHeader(infiles[0],paqsz, npaq, fgnotrl);
     99    uint_4 paqsz, npaqf;
     100    DecodeMiniFitsHeader(infiles[0],paqsz, npaqf, fgnotrl);
    96101
    97     int nzones = 3;
    98     RAcqMemZoneMgr mmgr(nzones, npaq, paqsz, sizeof(complex<r_4>)*paqsz);
     102    cout << " mcrd: NZones=" << nzones << " NbPaq=" << npaqz << "(in file=" << npaqf
     103         << " ) PaqSz=" << paqsz << endl;
     104         
     105    RAcqMemZoneMgr mmgr(nzones, npaqz, paqsz, sizeof(complex<r_4>)*paqsz);
    99106    mmgr.SetFinalizedMask((uint_4)MemZS_ProcA);
    100107
    101108    BRFitsReader reader(mmgr, infiles, fgnotrl);
    102     BRProcARaw2C proc(mmgr, outname, npaq, 1, npaq*infiles.size());
     109    BRProcARaw2C proc(mmgr, outname, npaqf, 1, npaqf*infiles.size()/npaqz);
    103110
    104111    cout << " mcrd.cc : Starting threads (reader, proc) ... " << endl;
Note: See TracChangeset for help on using the changeset viewer.