Ignore:
Timestamp:
10/18/13 16:56:16 (11 years ago)
Author:
tbretz
Message:
Removed the 'using namespace' from header
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/zofits.h

    r17258 r17262  
    2121namespace std
    2222{
    23 #else
    24 using namespace std;
    2523#endif
    2624
     
    478476            for (auto it=fCatalog.begin(); it!= fCatalog.end(); it++)
    479477            {
    480                 compressed_offset += sizeof(TileHeader);
    481                 heap_size         += sizeof(TileHeader);
     478                compressed_offset += sizeof(FITS::TileHeader);
     479                heap_size         += sizeof(FITS::TileHeader);
    482480                for (uint32_t j=0; j<it->size(); j++)
    483481                {
     
    539537        bool AddColumn(uint32_t cnt, char typechar, const string& name, const string& unit, const string& comment="", bool addHeaderKeys=true)
    540538        {
    541             return AddColumn(kFactRaw, cnt, typechar, name, unit, comment, addHeaderKeys);
     539            return AddColumn(FITS::kFactRaw, cnt, typechar, name, unit, comment, addHeaderKeys);
    542540        }
    543541
     
    612610        void reallocateBuffers()
    613611        {
    614             const size_t chunk_size = fRealRowWidth*fNumRowsPerTile + fRealColumns.size()*sizeof(BlockHeader) + sizeof(TileHeader) + 8; //+8 for checksuming;
     612            const size_t chunk_size = fRealRowWidth*fNumRowsPerTile + fRealColumns.size()*sizeof(FITS::BlockHeader) + sizeof(FITS::TileHeader) + 8; //+8 for checksuming;
    615613            fMemPool.setChunkSize(chunk_size);
    616614
     
    741739        uint64_t compressBuffer(char* dest, char* src, uint32_t num_rows, CatalogRow& catalog_row)
    742740        {
    743             const uint32_t thisRoundNumRows  = (num_rows%fNumRowsPerTile) ? num_rows%fNumRowsPerTile : fNumRowsPerTile;
    744             uint32_t       offset            = 0;
     741            const uint32_t thisRoundNumRows = (num_rows%fNumRowsPerTile) ? num_rows%fNumRowsPerTile : fNumRowsPerTile;
     742            uint32_t       offset           = 0;
    745743
    746744            //skip the checksum reserved area
     
    748746
    749747            //skip the 'TILE' marker and tile size entry
    750             uint64_t compressedOffset = sizeof(TileHeader);
     748            uint64_t compressedOffset = sizeof(FITS::TileHeader);
    751749
    752750            //now compress each column one by one by calling compression on arrays
     
    758756                    continue;
    759757
    760                 Compression& head = fRealColumns[i].block_head;
     758                FITS::Compression& head = fRealColumns[i].block_head;
    761759
    762760                //set the default byte telling if uncompressed the compressed Flag
     
    770768                    switch (head.getProc(j))
    771769                    {
    772                     case kFactRaw:
     770                    case FITS::kFactRaw:
    773771                        compressedOffset += compressUNCOMPRESSED(dest + compressedOffset, src  + offset, thisRoundNumRows*fRealColumns[i].col.size*fRealColumns[i].col.num);
    774772                        break;
    775773
    776                     case kFactSmoothing:
     774                    case FITS::kFactSmoothing:
    777775                        applySMOOTHING(src + offset, thisRoundNumRows*fRealColumns[i].col.num);
    778776                        break;
    779777
    780                     case kFactHuffman16:
    781                         if (head.getOrdering() == kOrderByCol)
     778                    case FITS::kFactHuffman16:
     779                        if (head.getOrdering() == FITS::kOrderByCol)
    782780                            compressedOffset += compressHUFFMAN16(dest + compressedOffset, src  + offset, thisRoundNumRows, fRealColumns[i].col.size, fRealColumns[i].col.num);
    783781                        else
     
    787785                }
    788786
    789                //check if compressed size is larger than uncompressed
    790                 if ((head.getProc(0) != kFactRaw) && (compressedOffset - previousOffset > fRealColumns[i].col.size*fRealColumns[i].col.num*thisRoundNumRows+head.getSizeOnDisk()))// && two)
    791                 {//if so set flag and redo it uncompressed
     787                //check if compressed size is larger than uncompressed
     788                //if so set flag and redo it uncompressed
     789                if ((head.getProc(0) != FITS::kFactRaw) && (compressedOffset - previousOffset > fRealColumns[i].col.size*fRealColumns[i].col.num*thisRoundNumRows+head.getSizeOnDisk()))// && two)
     790                {
    792791                    //de-smooth !
    793                     if (head.getProc(0) == kFactSmoothing)
     792                    if (head.getProc(0) == FITS::kFactSmoothing)
    794793                        UnApplySMOOTHING(src+offset, fRealColumns[i].col.num*thisRoundNumRows);
    795794
    796                     Compression he;
     795                    FITS::Compression he;
    797796
    798797                    compressedOffset = previousOffset + he.getSizeOnDisk();
     
    815814            }
    816815
    817             const TileHeader tile_head(thisRoundNumRows, compressedOffset);
    818             memcpy(dest, &tile_head, sizeof(TileHeader));
     816            const FITS::TileHeader tile_head(thisRoundNumRows, compressedOffset);
     817            memcpy(dest, &tile_head, sizeof(FITS::TileHeader));
    819818
    820819            return compressedOffset;
     
    833832                switch (fRealColumns[i].block_head.getOrdering())
    834833                {
    835                 case kOrderByRow:
     834                case FITS::kOrderByRow:
    836835                    //regular, "semi-transposed" copy
    837836                    for (uint32_t k=0;k<thisRoundNumRows;k++)
     
    842841                    break;
    843842
    844                 case kOrderByCol:
     843                case FITS::kOrderByCol:
    845844                    //transposed copy
    846845                    for (uint32_t j=0;j<fRealColumns[i].col.num;j++)
     
    965964        struct CompressedColumn
    966965        {
    967             CompressedColumn(const Table::Column& c, const Compression& h) : col(c),
     966            CompressedColumn(const Table::Column& c, const FITS::Compression& h) : col(c),
    968967                block_head(h)
    969968            {}
    970             Table::Column col;         ///< the regular column entry
    971             Compression  block_head;  ///< the compression data associated with that column
     969            Table::Column col;             ///< the regular column entry
     970            FITS::Compression block_head;  ///< the compression data associated with that column
    972971        };
    973972        vector<CompressedColumn> fRealColumns;     ///< Vector hosting the columns of the file
Note: See TracChangeset for help on using the changeset viewer.