FACT++  1.0
void zofits::open ( const char *  filename,
bool  addEXTNAMEKey = true 
)
inlinevirtual

open a new file.

Parameters
filenamethe name of the file
Whetheror not the name of the extension should be added or not

Reimplemented from ofits.

Definition at line 198 of file zofits.h.

References ofits::open().

199  {
200  ofits::open(filename, addEXTNAMEKey);
201 
202  //add compression-related header entries
203  SetBool( "ZTABLE", true, "Table is compressed");
204  SetInt( "ZNAXIS1", 0, "Width of uncompressed rows");
205  SetInt( "ZNAXIS2", 0, "Number of uncompressed rows");
206  SetInt( "ZPCOUNT", 0, "");
207  SetInt( "ZHEAPPTR", 0, "");
208  SetInt( "ZTILELEN", fNumRowsPerTile, "Number of rows per tile");
209  SetInt( "THEAP", 0, "");
210  SetStr( "RAWSUM", " 0", "Checksum of raw little endian data");
211  SetFloat("ZRATIO", 0, "Compression ratio");
212  SetInt( "ZSHRINK", 1, "Catalog shrink factor");
213 
214  fCatalogSize = 0;
215  fRealRowWidth = 0;
216  fCatalogOffset = 0;
217  fCatalogSize = 0;
218  fCheckOffset = 0;
219 
220  fRealColumns.clear();
221  fCatalog.clear();
222  fCatalogSum.reset();
223  fRawSum.reset();
224  }
bool SetInt(const std::string &key, int64_t i, const std::string &comment="")
Definition: ofits.h:535
uint32_t fNumRowsPerTile
Number of rows per tile.
Definition: zofits.h:980
bool SetBool(const std::string &key, bool b, const std::string &comment="")
Definition: ofits.h:516
uint32_t fCatalogSize
Actual catalog size (.size() is slow on large lists)
Definition: zofits.h:978
Checksum fRawSum
Raw sum (specific to FACT)
Definition: zofits.h:985
Checksum fCatalogSum
Checksum of the catalog.
Definition: zofits.h:984
int32_t fCheckOffset
offset to the data pointer to calculate the checksum
Definition: zofits.h:986
virtual void open(const char *filename, bool addEXTNAMEKey=true)
Definition: ofits.h:390
bool SetStr(const std::string &key, std::string s, const std::string &comment="")
Definition: ofits.h:526
void reset()
Definition: checksum.h:15
off_t fCatalogOffset
Offset of the catalog from the beginning of the file.
Definition: zofits.h:981
bool SetFloat(const std::string &key, double f, int p, const std::string &comment="")
Definition: ofits.h:543
std::vector< CompressedColumn > fRealColumns
Vector hosting the columns of the file.
Definition: zofits.h:1005
uint32_t fRealRowWidth
Width in bytes of one uncompressed row.
Definition: zofits.h:1006
CatalogType fCatalog
Catalog for this file.
Definition: zofits.h:977

+ Here is the call graph for this function: