FACT++  1.0
void zfits::InitCompressionReading ( )
inlineprivate

Definition at line 84 of file zfits.h.

References ___err___, AllocateBuffers(), clear(), fCatalogInitialized, fColumnOrdering, fNumRowsPerTile, fNumTiles, fits::fTable, fits::GetInt(), gLog, fits::Table::is_compressed, fits::kCompFACT, FITS::kOrderByRow, ReadCatalog(), and fits::Table::sorted_cols.

Referenced by ReadBinaryRow().

85  {
86  fCatalogInitialized = true;
87 
88  if (!fTable.is_compressed)
89  return;
90 
91  //The constructor may have failed
92  if (!good())
93  return;
94 
96  for (auto it=fTable.sorted_cols.cbegin(); it!= fTable.sorted_cols.cend(); it++)
97  {
98  if (it->comp == kCompFACT)
99  continue;
100 
101  clear(rdstate()|std::ios::badbit);
102 #ifdef __EXCEPTIONS
103  throw std::runtime_error("Only the FACT compression scheme is handled by this reader.");
104 #else
105  gLog << ___err___ << "ERROR - Only the FACT compression scheme is handled by this reader." << std::endl;
106  return;
107 #endif
108  }
109 
111 
112  //Get compressed specific keywords
113  fNumTiles = fTable.is_compressed ? GetInt("NAXIS2") : 0;
114  fNumRowsPerTile = fTable.is_compressed ? GetInt("ZTILELEN") : 0;
115 
116  //read the file's catalog
117  ReadCatalog();
118 
119  //give it some space for uncompressing
120  AllocateBuffers();
121  }
size_t fNumRowsPerTile
Number of rows per compressed tile.
Definition: zfits.h:143
bool is_compressed
Definition: fits.h:93
bool fCatalogInitialized
Definition: zfits.h:135
void ReadCatalog()
Definition: zfits.h:181
SortedColumns sorted_cols
Definition: fits.h:117
#define gLog
Definition: fits.h:36
#define ___err___
Definition: fits.h:37
Table fTable
Definition: fits.h:502
std::vector< char > fColumnOrdering
ordering of the column&#39;s rows. Can change from tile to tile.
Definition: zfits.h:140
int64_t GetInt(const std::string &key) const
Definition: fits.h:1008
size_t fNumTiles
Total number of tiles.
Definition: zfits.h:142
void clear()
Definition: HeadersFTM.h:216
void AllocateBuffers()
Definition: zfits.h:157

+ Here is the call graph for this function:

+ Here is the caller graph for this function: