Changeset 16898


Ignore:
Timestamp:
06/24/13 16:04:52 (11 years ago)
Author:
lyard
Message:
Propagated the new naming of enums to other files....
Location:
trunk
Files:
2 edited

Legend:

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

    r16897 r16898  
    3838    unsigned char numProcs;
    3939    BlockHeader(uint64_t      s=0,
    40                 char          o=FACT_ROW_MAJOR,
     40                char          o=zfits::kOrderByRow,
    4141                unsigned char n=1) : size(s),
    4242                                     ordering(o),
     
    11751175        switch (_columns[i].getColumnOrdering())//getCompression())
    11761176        {
    1177             case FACT_ROW_MAJOR:
     1177            case zfits::kOrderByRow:
    11781178                for (uint32_t k=0;k<thisRoundNumRows;k++)
    11791179                {//regular, "semi-transposed" copy
     
    11831183            break;
    11841184
    1185             case FACT_COL_MAJOR :
     1185            case zfits::kOrderByCol :
    11861186                for (int j=0;j<_columns[i].numElems();j++)
    11871187                    for (uint32_t k=0;k<thisRoundNumRows;k++)
     
    13231323            switch (sequence[j])
    13241324            {
    1325                 case FACT_RAW:
     1325                case zfits::kFactRaw:
    13261326//                    if (head.numProcs == 1)
    13271327                        compressedOffset += compressUNCOMPRESSED(&(_compressedBuffer[threadIndex][compressedOffset]), &(_transposedBuffer[threadIndex][offset]), thisRoundNumRows, _columns[i].sizeOfElems(), _columns[i].numElems());
    13281328                break;
    1329                 case FACT_SMOOTHING:
     1329                case zfits::kFactSmoothing:
    13301330                        applySMOOTHING(&(_compressedBuffer[threadIndex][compressedOffset]), &(_transposedBuffer[threadIndex][offset]), thisRoundNumRows, _columns[i].sizeOfElems(), _columns[i].numElems());
    13311331                break;
    1332                 case FACT_HUFFMAN16:
    1333                     if (head.ordering == FACT_COL_MAJOR)
     1332                case zfits::kFactHuffman16:
     1333                    if (head.ordering == zfits::kOrderByCol)
    13341334                        compressedOffset += compressHUFFMAN(&(_compressedBuffer[threadIndex][compressedOffset]), &(_transposedBuffer[threadIndex][offset]), thisRoundNumRows, _columns[i].sizeOfElems(), _columns[i].numElems());
    13351335                    else
     
    13431343
    13441344        //check if compressed size is larger than uncompressed
    1345         if (sequence[0] != FACT_RAW &&
     1345        if (sequence[0] != zfits::kFactRaw &&
    13461346            compressedOffset - previousOffset > _columns[i].sizeOfElems()*_columns[i].numElems()*thisRoundNumRows+sizeof(BlockHeader)+sizeof(uint16_t)*sequence.size())
    13471347        {//if so set flag and redo it uncompressed
     
    13521352            he.size = compressedOffset - previousOffset;
    13531353            he.numProcs = 1;
    1354             he.ordering = FACT_ROW_MAJOR;
     1354            he.ordering = zfits::kOrderByRow;
    13551355            memcpy(&(_compressedBuffer[threadIndex][previousOffset]), (char*)(&he), sizeof(BlockHeader));
    1356             _compressedBuffer[threadIndex][previousOffset+sizeof(BlockHeader)] = FACT_RAW;
     1356            _compressedBuffer[threadIndex][previousOffset+sizeof(BlockHeader)] = zfits::kFactRaw;
    13571357            offset += thisRoundNumRows*_columns[i].sizeOfElems()*_columns[i].numElems();
    13581358           _catalog[currentCatalogRow][i].first = compressedOffset - _catalog[currentCatalogRow][i].second;
     
    16841684        //get header structures
    16851685        BlockHeader rawHeader;
    1686         BlockHeader smoothmanHeader(0, FACT_ROW_MAJOR, 2);
     1686        BlockHeader smoothmanHeader(0, zfits::kOrderByRow, 2);
    16871687        vector<uint16_t> rawProcessings(1);
    1688         rawProcessings[0] = FACT_RAW;
     1688        rawProcessings[0] = zfits::kFactRaw;
    16891689        vector<uint16_t> smoothmanProcessings(2);
    1690         smoothmanProcessings[0] = FACT_SMOOTHING;
    1691         smoothmanProcessings[1] = FACT_HUFFMAN16;
     1690        smoothmanProcessings[0] = zfits::kFactSmoothing;
     1691        smoothmanProcessings[1] = zfits::kFactHuffman16;
    16921692//        smoothmanProcessings[2] = FACT_RAW;
    16931693
  • trunk/Mars/mcore/zfits.h

    r16897 r16898  
    145145        if (fTable.is_compressed)
    146146        for (auto it=fTable.sorted_cols.begin(); it!= fTable.sorted_cols.end(); it++)
    147             if (it->comp != kCompFACT)
    148147            {
    149148                if (it->comp == kCompFACT)
     
    158157#endif
    159158            }
    160         }
    161159
    162160        fColumnOrdering.resize(fTable.sorted_cols.size());
Note: See TracChangeset for help on using the changeset viewer.