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

Reimplemented in zofits.

Definition at line 390 of file ofits.h.

References clear(), SetInt(), and SetStr().

Referenced by main(), ofits(), zofits::open(), and open().

391  {
392  fDataSum = 0;
393  fHeaderSum = 0;
394 
395  fTable = Table();
396  fKeys.clear();
397 
398  SetStr("XTENSION", "BINTABLE", "binary table extension");
399  SetInt("BITPIX", 8, "8-bit bytes");
400  SetInt("NAXIS", 2, "2-dimensional binary table");
401  SetInt("NAXIS1", 0, "width of table in bytes");
402  SetInt("NAXIS2", 0, "number of rows in table");
403  SetInt("PCOUNT", 0, "size of special data area");
404  SetInt("GCOUNT", 1, "one data group (required keyword)");
405  SetInt("TFIELDS", 0, "number of fields in each row");
406  if (addEXTNAMEKey)
407  SetStr("EXTNAME", "", "name of extension table");
408  else
409  fManualExtName = true;
410  SetStr("CHECKSUM", "0000000000000000", "Checksum for the whole HDU");
411  SetStr("DATASUM", " 0", "Checksum for the data block");
412 
413  if (!fFilebuf.open(filename, ios_base::out|ios_base::trunc))
414  setstate(ios_base::failbit);
415  else
416  clear();
417  }
bool SetInt(const std::string &key, int64_t i, const std::string &comment="")
Definition: ofits.h:535
Checksum fDataSum
Definition: ofits.h:340
Checksum fHeaderSum
Definition: ofits.h:341
Table fTable
Definition: ofits.h:327
bool SetStr(const std::string &key, std::string s, const std::string &comment="")
Definition: ofits.h:526
std::filebuf fFilebuf
Definition: ofits.h:32
std::vector< Key > fKeys
Definition: ofits.h:249
void clear()
Definition: HeadersFTM.h:216
bool fManualExtName
Definition: ofits.h:344

+ Here is the call graph for this function:

+ Here is the caller graph for this function: