Public Member Functions | List of all members
h5::Header Class Reference

Writes header info about the build, git commit, branch, etc. More...

#include <Header.hpp>

Public Member Functions

const std::stringget_header () const noexcept
 
std::string get_env_variables () const noexcept
 Returns the environment variables at compile time of the simulation that produced the file.
 
std::string get_library_versions () const noexcept
 Returns the contents of the LibraryVersions.txt file generated by CMake of the simulation that produced the file.
 

Detailed Description

Writes header info about the build, git commit, branch, etc.

A Header object is used to store the info_from_build() result in the HDF5 files. The Header is automatically added to every single file by the constructor of H5File.

Example

You can read the header info out of an H5 file as shown in the example:

h5::H5File<h5::AccessType::ReadWrite> my_file0(h5_file_name);
// Check that the header was written correctly
const std::string header = my_file0.get<h5::Header>("/header").get_header();

The documentation for this class was generated from the following file: