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

◆ read_n() [1/2]

std::tuple< VecColumn< Ts, 1 >... > read_n ( const TypedKey< Ts, TKey > &...  keys) const

Read a tuple of columns with given names or indices.

Example usages:

// Heterogeneous sequence (returns a tuple)
auto columns = ext.read_n(as<int>("A"), as<float, 2>("B"), as<std::string>("C"));
auto columns = ext.read_n(as<int>(0), as<float, 2>(3), as<std::string>(4));
// Homogeneous sequence (returns a vector)
auto columns = ext.read_n<int, 2>({"A", "B", "C"});
auto columns = ext.read_n<int, 2>({0, 3, 4});
Warning
Multidimensional columns are read as vector columns as of today.
Examples
EleFitsBintableExample.cpp, and EleFitsTutorial.cpp.