EleFits  5.0.0
A modern C++ API on top of CFITSIO

◆ find()

const T & find ( const std::string name,
long  version = 0 
)

Access the first HDU with given name, type and version.

Template Parameters
TThe type of HDU or data unit
Parameters
nameThe HDU name
versionThe HDU version, or 0 to not check the version

The template parameter is used to disambiguate when two extensions of different types have the same name. For example, in a file with an image extension and a binary table extension both named "EXT", find<ImageHdu>("EXT") returns the image extension, while find<BintableHdu>("EXT") returns the binary table extension, and find<Hdu>("EXT") returns whichever of the two has the smallest index.

In the case where several HDUs of same type have the same type, name and version (which is discouraged by the standard, but not forbidden), method readHduNames() should be used to get the indices and then access(long) should be called.

See also
access(long)
access(const std::string&)