This commit is contained in:
Robin committed 2024-12-27 11:47:44 +01:00
1 parent 2c7ea3f624
commit dbebb6d9f2
8 files changed
+117 -13

No files matched your search

+25
View File
@@ -8,17 +8,42 @@
#include "filepathmanager.h"
/**
* @brief Simple wrapper around all the NetCDF functionality.
*/
class DataReader {
public:
/**
* @brief Constructor.
* @param path Path to the directory containing all the .nc4 files.
* @param variableName The variable we are interested in.
*/
DataReader(const std::string &path, std::string variableName);
/**
* @brief The length of the flat data in variableName.
* Used for allocating the right amount of memory.
*/
size_t fileLength(size_t fileIndex);
/**
* @brief Write all the data in file fileIndex of variable we re interested in into the dataOut.
*/
template <typename T>
void loadFile(T* dataOut, size_t fileIndex);
/**
* @brief Write all the data in file fileIndex of variable variableName into the dataOut.
* @param dataOut pointer to memory that should be written to.
* @param fileIndex the index of the file we want to load into memory.
* @param variableName the name of the variable
*/
template <typename T>
void loadFile(T* dataOut, size_t fileIndex, const std::string& variableName);
/**
* @brief Get size of a variable.
*/
size_t axisLength(size_t fileIndex, const std::string& axisName);
~DataReader();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.