Reimplemented in zofits.
Definition at line 596 of file ofits.h.
References ___err___, ofits::Table::bytes_per_row, ofits::Table::cols, ofits::Key::comment, FITS::CommentFromType(), findcol(), gLog, ofits::Table::Column::name, ofits::Table::Column::num, ofits::Table::num_cols, ofits::Table::Column::offset, SetStr(), size, ofits::Table::Column::size, FITS::SizeFromType(), type, and ofits::Table::Column::type.
Referenced by zofits::AddColumn(), AddColumn(), AddColumnBool(), AddColumnByte(), AddColumnChar(), AddColumnDouble(), AddColumnFloat(), AddColumnInt(), AddColumnLong(), AddColumnShort(), and main().
600 std::ostringstream sout;
601 sout <<
"File not open... ignoring column '" << name <<
"'";
603 throw std::runtime_error(sout.str());
612 std::ostringstream sout;
613 sout <<
"Header already written, no new column can be defined... ignoring column '" << name <<
"'";
615 throw std::runtime_error(sout.str());
624 std::ostringstream sout;
625 sout <<
"A column with the name '" << name <<
"' already exists.";
627 throw std::runtime_error(sout.str());
634 typechar = toupper(typechar);
636 static const std::string allow(
"LABIJKEDQ");
637 #if GCC_VERSION < 40603 638 if (std::find(allow.begin(), allow.end(), typechar)==allow.end())
640 if (std::find(allow.cbegin(), allow.cend(), typechar)==allow.end())
643 std::ostringstream sout;
644 sout <<
"Column type '" << typechar <<
"' not supported.";
646 throw std::runtime_error(sout.str());
653 std::ostringstream
type;
664 #if GCC_VERSION < 40603 665 const std::string nc = std::to_string((
long long int)(
fTable.
num_cols));
670 SetStr(
"TTYPE"+nc, name, comment);
672 SetStr(
"TUNIT"+nc, unit,
"unit of "+name);
static uint32_t SizeFromType(char type)
std::vector< Column > cols
bool SetStr(const std::string &key, std::string s, const std::string &comment="")
std::vector< Table::Column >::const_iterator findcol(const std::string &name)
std::vector< char > fOutputBuffer
static std::string CommentFromType(char type)