Changeset 17006 for trunk/FACT++


Ignore:
Timestamp:
08/14/13 13:15:58 (11 years ago)
Author:
lyard
Message:
this is version with improved wrong channels output
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsCompressor.cc

    r16944 r17006  
    15831583    }
    15841584
     1585
    15851586    //should we use specific compression on some columns ?
    15861587    const vector<string> columnsCompression = conf.Vec<string>("compression");
     
    18761877    ostringstream wrongChannels;
    18771878    map<int, int> wrongChannelsMap;
     1879    map<int, int> wrongChannelsLastValues;
    18781880    for (uint32_t i=0;i<1440;i++)
     1881    {
    18791882        wrongChannelsMap[i] = 0;
     1883        wrongChannelsLastValues[i] = 0;
     1884    }
    18801885    for (uint32_t i=0;i<inFile.GetNumRows();i++)
    18811886    {
    18821887        if (displayText) cout << "\r Row " << i+1 << flush;
    1883         inFile.GetNextRow();
     1888        if (!inFile.GetNextRow())
     1889        {
     1890            cout << "ERROR: file has less rows than advertized. aborting" << endl;
     1891            exit(0);
     1892        }
    18841893        //copy from inFile internal structures to buffer
    18851894        int32_t count=0;
     
    19101919                {
    19111920                    wrongChannelsMap[j]++;
     1921                    wrongChannelsLastValues[j] = thisStartCell;
    19121922                    wrongChannels << j;
    19131923                }
     
    19261936        {
    19271937            if (wrongChannelsMap[i] != 0)
    1928                 cout << i << "(" << wrongChannelsMap[i] << ") ";
     1938                cout << i << "(" << wrongChannelsMap[i] << "|" << wrongChannelsLastValues[i] << ") ";
    19291939        }
    19301940        cout << endl;
     
    21172127        cout << "ERROR: file checksums seems wrong" << endl;
    21182128
    2119     reconstructedFile.close();
     2129    if (!reconstructedFile.close())
     2130    {
     2131        cout << "ERROR: disk probably full..." << endl;
     2132        return -1;
     2133    }
    21202134
    21212135    //get original and reconstructed checksum and datasum
Note: See TracChangeset for help on using the changeset viewer.