Write a homogeneous or heterogeneous sequence of records.
- Template Parameters
-
Mode | The write mode |
T | The record value type for homogeneous sequences (automatically deduced) |
Ts... | The record value types for heterogeneous sequences (automatically deduced) |
TSeq | The sequence type (automatically deduced) |
- Parameters
-
records | The sequence of records |
keywords | The selection to be written |
Several methods allow write a sequence of records or subset of sequence of records. Analogously to write()
, template parameter Mode
controls the writing behavior, depending on wether the keyword to be written already exists or not.
If parameter keywords
is provided, then only the records for which the keyword belongs to keywords
are written. This is especially handy when a unique sequence of records should be written in different HDUs.
Example usage:
h0.write_n(records);
@ CreateNew
Create a new record, even if keyword already exists.
where h0
, h1
, h2
are headers of different HDUs and records
is a sequence of records, like a RecordSeq
.
- See also
- RecordMode