#ifndef HDF5_READER_H #define HDF5_READER_H #include #include "blitz/array.h" // class for reading data from a hdf5-file class Hdf5Reader { public: // Constructor: taking a string with the path to the directory and // a string with the name of the file to be read (without the ".h5", which is appended by default) Hdf5Reader(std::string directory, std::string filename); // Constructor: taking a string of the absolute path to the file (string is not changed) Hdf5Reader(std::string absolute_filename); // read a 3-dimensional array from the hdf5-file specified at construction of the reader // object at the hdf5-path "path" and return it as a blitz::Array blitz::Array readD3Double(std::string path); // read a 2-dimensional array from the hdf5-file specified at construction of the reader // object at the hdf5-path "path" and return it as a blitz::Array blitz::Array readD2Double(std::string path); // read a 1-dimensional array from the hdf5-file specified at construction of the reader // object at the hdf5-path "path" and return it as a blitz::Array blitz::Array readD1Double(std::string path); private: std::string absolute_filename_; }; #endif /* HDF5_READER_H */