Changeset 16418 for trunk


Ignore:
Timestamp:
05/29/13 01:16:50 (12 years ago)
Author:
lyard
Message:
Fixed bugs from improvements
Location:
trunk
Files:
3 edited

Legend:

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

    r16285 r16418  
    14761476
    14771477    //Open input's fits file
    1478     factFits inFile(fileNameIn);
     1478    factfits inFile(fileNameIn);
    14791479
    14801480    if (inFile.IsCompressedFITS())
     
    15041504
    15051505    //Because the file to open MUST be given by the constructor, I must use a pointer instead
    1506     factFits* drsFile = NULL;
     1506    factfits* drsFile = NULL;
    15071507    //try to open the Drs file. If any.
    15081508    if (drsFileName != "")
     
    15101510        try
    15111511        {
    1512             drsFile = new factFits(drsFileName);
     1512            drsFile = new factfits(drsFileName);
    15131513        }
    15141514        catch (...)
     
    17621762
    17631763    //get a compressed reader
    1764     factFits verifyFile(fileNameOut, tableName, false);
     1764    factfits verifyFile(fileNameOut, tableName, false);
    17651765
    17661766    //and the header of the compressed file
  • trunk/Mars/mcore/factfits.h

    r16417 r16418  
    5757
    5858        int16_t *startCell = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetStartCellData);
    59         int16_t *data      = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetData);
     59
     60        const Pointers::iterator dtaIt = fPointers.find("Data");
     61        if (dtaIt == fPointers.end()) return true;
     62        int16_t *data      = reinterpret_cast<int16_t*>(dtaIt->second);
    6063
    6164        for (uint32_t i=0; i<1440*1024; i+=1024, startCell++)
  • trunk/Mars/mcore/zfits.h

    r16416 r16418  
    146146                //swap the bytes
    147147                int64_t tempValues[2] = {0,0};
    148                 revcpy<8>(reinterpret_cast<char*>(tempValues[0]), readBuf, 2);
     148                revcpy<8>(reinterpret_cast<char*>(&tempValues[0]), readBuf, 2);
    149149
    150150                //add catalog entry
     
    153153
    154154        //see if there is a gap before heap data
    155         fHeapOff = fTable.GetHeapShift();
     155        fHeapOff = tellg()+fTable.GetHeapShift();
    156156    }
    157157
     
    179179
    180180            //skip to the beginning of the tile
    181             seekg(fCatalog[currentCatRow][0].second, ios_base::cur);
     181            seekg(fHeapOff+fCatalog[currentCatRow][0].second);
    182182            read(fCompressedBuffer.data(), sizeToRead);
    183183
Note: See TracChangeset for help on using the changeset viewer.