EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches

◆ as()

Record< TValue > as ( const std::string keyword) const

Find and cast the first record with given keyword.

Template Parameters
TValueThe destination value type.

Although the method returns a Record, it can itself be sliced as its value, so the following works:

RecordSeq records; // Equivalent to RecordVec<VariantValue>
// ...
int i = records.as<int>("KEYWORD"); // Get the value as int
Record< TValue > as(const std::string &keyword) const
Find and cast the first record with given keyword.
A vector of records with find and conversion services.
Definition: RecordVec.h:24