Changeset 16810 for trunk/Mars/mcore
- Timestamp:
- 06/12/13 10:58:06 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/zfits.h
r16669 r16810 79 79 80 80 private: 81 typedef struct TileHeader 82 { 83 char id[4]; 84 uint32_t numRows; 85 uint64_t size; 86 TileHeader(uint32_t nRows=0, 87 uint64_t s=0) : id({'T', 'I', 'L', 'E'}), 88 numRows(nRows), 89 size(s) 90 { }; 91 friend ostream& operator << (ostream& out, const TileHeader& h) 92 { 93 out << h.id[0] << h.id[1] << h.id[2] << h.id[3] << " num Rows: " << h.numRows << ", tile size: " << h.size; 94 return out; 95 } 96 } __attribute__((__packed__)) TileHeader; 81 97 82 98 // Do what it takes to initialize the compressed structured … … 224 240 225 241 //skip to the beginning of the tile 226 seekg(fHeapOff+fCatalog[requestedTile][0].second); 242 seekg(fHeapOff+fCatalog[requestedTile][0].second - sizeof(TileHeader)); 243 TileHeader tHead; 244 read((char*)(&tHead), sizeof(TileHeader)); 245 cout << tHead << endl; 246 // seekg(fHeapOff+fCatalog[requestedTile][0].second); 227 247 read(fCompressedBuffer.data(), sizeToRead); 228 248 … … 231 251 fCopy.good()) 232 252 { 253 fCopy.write((char*)(&tHead), sizeof(TileHeader)); 233 254 fCopy.write(fCompressedBuffer.data(), sizeToRead); 234 255 if (!fCopy)
Note:
See TracChangeset
for help on using the changeset viewer.