FACT++  1.0
virtual bool ofits::WriteTableHeader ( const char *  name = "DATA")
inlinevirtual

Reimplemented in zofits, and factofits.

Definition at line 844 of file ofits.h.

References ___err___, ofits::Table::bytes_per_row, ofits::Table::cols, End(), gLog, SetInt(), SetStr(), WriteCatalog(), WriteDrsOffsetsTable(), WriteFitsHeader(), and WriteHeader().

Referenced by main(), SetDefaultKeys(), and zofits::WriteTableHeader().

845  {
846  if (tellp()>0)
847  {
848 #ifdef __EXCEPTIONS
849  throw std::runtime_error("File not empty anymore.");
850 #else
851  gLog << ___err___ << "ERROR - File not empty anymore." << std::endl;
852  return false;
853 #endif
854  }
855 
857 
859 
860  if (!fManualExtName)
861  SetStr("EXTNAME", name);
862  SetInt("NAXIS1", fTable.bytes_per_row);
863  SetInt("TFIELDS", fTable.cols.size());
864 
865  End();
866 
867  WriteHeader();
868 
869  WriteCatalog();
870 
871  return good();
872  }
bool SetInt(const std::string &key, int64_t i, const std::string &comment="")
Definition: ofits.h:535
Checksum WriteHeader()
Definition: ofits.h:797
Checksum fHeaderSum
Definition: ofits.h:341
#define gLog
Definition: fits.h:36
virtual bool WriteDrsOffsetsTable()
Definition: ofits.h:834
#define ___err___
Definition: fits.h:37
Table fTable
Definition: ofits.h:327
size_t bytes_per_row
Definition: ofits.h:306
std::vector< Column > cols
Definition: ofits.h:319
bool SetStr(const std::string &key, std::string s, const std::string &comment="")
Definition: ofits.h:526
virtual bool WriteCatalog()
Definition: ofits.h:839
void End()
Definition: ofits.h:588
bool fManualExtName
Definition: ofits.h:344
Checksum WriteFitsHeader()
Definition: ofits.h:809

+ Here is the call graph for this function:

+ Here is the caller graph for this function: