FACT++  1.0
zfits Class Reference

#include <zfits.h>

+ Inheritance diagram for zfits:
+ Collaboration diagram for zfits:

Public Member Functions

 zfits (const std::string &fname, const std::string &tableName="", bool force=false)
 
 zfits (const std::string &fname, const std::string &fout, const std::string &tableName, bool force=false)
 
bool SkipNextRow ()
 
virtual bool IsFileOk () const
 
size_t GetNumRows () const
 
size_t GetBytesPerRow () const
 
- Public Member Functions inherited from fits
void Exception (const std::string &txt)
 
 fits (const std::string &fname, const std::string &tableName="", bool force=false)
 
 fits (const std::string &fname, const std::string &fout, const std::string &tableName, bool force=false)
 
 fits ()
 
 ~fits ()
 
void ZeroBufferForChecksum (std::vector< char > &vec, const uint64_t extraZeros=0)
 
uint8_t ReadRow (size_t row)
 
template<size_t N>
void revcpy (char *dest, const char *src, const int &num)
 
virtual void MoveColumnDataToUserSpace (char *dest, const char *src, const Table::Column &c)
 
virtual bool GetRow (size_t row, bool check=true)
 
bool GetNextRow (bool check=true)
 
template<class T , class S >
const T & GetAs (const std::string &name)
 
void EnableAddressExceptions (bool b=true)
 
void DisableAddressExceptions ()
 
void * SetPtrAddress (const std::string &name)
 
template<typename T >
bool SetPtrAddress (const std::string &name, T *ptr, size_t cnt)
 
template<class T >
bool SetRefAddress (const std::string &name, T &ptr)
 
template<typename T >
bool SetVecAddress (const std::string &name, std::vector< T > &vec)
 
template<typename T >
Get (const std::string &key) const
 
template<typename T >
Get (const std::string &key, const std::string &deflt) const
 
bool SetPtrAddress (const std::string &name, void *ptr, size_t cnt=0)
 
bool HasKey (const std::string &key) const
 
bool HasColumn (const std::string &col) const
 
const Table::ColumnsGetColumns () const
 
const Table::SortedColumnsGetSortedColumns () const
 
const Table::KeysGetKeys () const
 
int64_t GetInt (const std::string &key) const
 
uint64_t GetUInt (const std::string &key) const
 
double GetFloat (const std::string &key) const
 
std::string GetStr (const std::string &key) const
 
size_t GetN (const std::string &key) const
 
size_t GetRow () const
 
 operator bool () const
 
void PrintKeys (bool all_keys=false) const
 
void PrintColumns () const
 
bool IsHeaderOk () const
 
bool IsCompressedFITS () const
 
const std::vector< std::string > & GetTables () const
 
- Public Member Functions inherited from izstream
 izstream ()
 
 izstream (const char *name)
 
 ~izstream ()
 
int is_open ()
 
void open (const char *name)
 
void close ()
 
std::streambuf::pos_type seekoff (std::streambuf::off_type offset, std::ios_base::seekdir dir, std::ios_base::openmode=std::ios_base::in)
 
std::streambuf::pos_type seekpos (std::streambuf::pos_type pos, std::ios_base::openmode=std::ios_base::in)
 

Protected Member Functions

virtual void StageRow (size_t row, char *dest)
 
- Protected Member Functions inherited from fits
bool ReadBlock (std::vector< std::string > &vec)
 
std::string Compile (const std::string &key, int16_t i=-1) const
 
void Constructor (const std::string &fname, std::string fout="", const std::string &tableName="", bool force=false)
 

Private Member Functions

void InitCompressionReading ()
 
void MoveColumnDataToUserSpace (char *dest, const char *src, const Table::Column &c)
 
void AllocateBuffers ()
 
void ReadCatalog ()
 
virtual void WriteRowToCopyFile (size_t row)
 
bool ReadBinaryRow (const size_t &rowNum, char *bufferToRead)
 
uint32_t UncompressUNCOMPRESSED (char *dest, const char *src, uint32_t numElems, uint32_t sizeOfElems)
 
uint32_t UncompressHUFFMAN16 (char *dest, const char *src, uint32_t numChunks)
 
uint32_t UnApplySMOOTHING (int16_t *data, uint32_t numElems)
 
bool UncompressBuffer (const std::vector< size_t > &offsets, const uint32_t &thisRoundNumRows, const uint32_t offset)
 
void CheckIfFileIsConsistent (bool update_catalog=false)
 

Private Attributes

bool fCatalogInitialized
 
std::vector< char > fBuffer
 store the uncompressed rows More...
 
std::vector< char > fTransposedBuffer
 intermediate buffer to transpose the rows More...
 
std::vector< char > fCompressedBuffer
 compressed rows More...
 
std::vector< char > fColumnOrdering
 ordering of the column's rows. Can change from tile to tile. More...
 
size_t fNumTiles
 Total number of tiles. More...
 
size_t fNumRowsPerTile
 Number of rows per compressed tile. More...
 
int64_t fCurrentRow
 current row in memory signed because we need -1 More...
 
size_t fShrinkFactor
 shrink factor More...
 
streamoff fHeapOff
 offset from the beginning of the file of the binary data More...
 
streamoff fHeapFromDataStart
 offset from the beginning of the data table More...
 
std::vector< std::vector< std::pair< int64_t, int64_t > > > fCatalog
 Catalog, i.e. the main table that points to the compressed data. More...
 
std::vector< size_t > fTileSize
 size in bytes of each compressed tile More...
 
std::vector< std::vector< size_t > > fTileOffsets
 offset from start of tile of a given compressed column More...
 
Checksum fRawsum
 Checksum of the uncompressed, raw data. More...
 

Additional Inherited Members

- Public Types inherited from fits
enum  Compression_t { kCompUnknown, kCompFACT }
 
enum  fitsstate { throwbit = 8 }
 
typedef std::pair< void *, Table::ColumnAddress
 
typedef std::vector< AddressAddresses
 
typedef std::unordered_map< std::string, void * > Pointers
 
- Static Public Member Functions inherited from fits
static bool Compare (const Address &p1, const Address &p2)
 
- Protected Attributes inherited from fits
std::ofstream fCopy
 
std::vector< std::string > fListOfTables
 
Table fTable
 
Addresses fAddresses
 
Pointers fPointers
 
std::vector< std::vector< char > > fGarbage
 
std::vector< char > fBufferRow
 
std::vector< char > fBufferDat
 
size_t fRow
 
Checksum fChkHeader
 
Checksum fChkData
 

Detailed Description

Definition at line 16 of file zfits.h.


The documentation for this class was generated from the following file: