FACT++  1.0
bool zofits::AddColumn ( const FITS::Compression comp,
uint32_t  cnt,
char  typechar,
const std::string &  name,
const std::string &  unit,
const std::string &  comment = "",
bool  addHeaderKeys = true 
)
inlinevirtual

Overload of the simplified compressed version.

Reimplemented from ofits.

Definition at line 573 of file zofits.h.

References ofits::AddColumn(), FITS::CommentFromType(), size, and FITS::SizeFromType().

575  {
576  if (!ofits::AddColumn(1, 'Q', name, unit, comment, addHeaderKeys))
577  return false;
578 
579  const size_t size = FITS::SizeFromType(typechar);
580 
581  Table::Column col;
582  col.name = name;
583  col.type = typechar;
584  col.num = cnt;
585  col.size = size;
586  col.offset = fRealRowWidth;
587 
588  fRealRowWidth += size*cnt;
589 
590  fRealColumns.emplace_back(col, comp);
591 
592  SetStr("ZFORM"+std::to_string((long long int)(fRealColumns.size())), std::to_string((long long int)(cnt))+typechar, "format of "+name+" "+FITS::CommentFromType(typechar));
593  SetStr("ZCTYP"+std::to_string((long long int)(fRealColumns.size())), "FACT", "Compression type: FACT");
594 
595  return true;
596  }
virtual bool AddColumn(uint32_t cnt, char typechar, const std::string &name, const std::string &unit, const std::string &comment="", bool addHeaderKeys=true)
Definition: ofits.h:596
static uint32_t SizeFromType(char type)
Definition: FITS.h:70
bool SetStr(const std::string &key, std::string s, const std::string &comment="")
Definition: ofits.h:526
int size
Definition: db_dim_server.c:17
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
static std::string CommentFromType(char type)
Definition: FITS.h:50

+ Here is the call graph for this function: