30 #include "splash/DCException.hpp" 31 #include "splash/Dimensions.hpp" 40 typedef hid_t H5Handle;
42 static const H5Handle INVALID_HANDLE = -1;
66 typedef std::map<uint32_t, HandleCtrStr> HandleMap;
77 FNS_MPI = 0, FNS_ITERATIONS, FNS_FULLNAME
81 typedef void (*FileCreateCallback)(H5Handle handle, uint32_t index,
void *userData);
82 typedef void (*FileOpenCallback)(H5Handle handle, uint32_t index,
void *userData);
83 typedef void (*FileCloseCallback)(H5Handle handle, uint32_t index,
void *userData);
90 HandleMgr(uint32_t maxHandles, FileNameScheme fileNameScheme);
102 void setFileNameScheme(FileNameScheme fileNameScheme)
throw (DCException);
111 void open(Dimensions mpiSize,
const std::string baseFilename,
112 hid_t fileAccProperties,
unsigned flags)
throw (DCException);
121 void open(
const std::string fullFilename,
122 hid_t fileAccProperties,
unsigned flags)
throw (DCException);
134 H5Handle
get(uint32_t index)
throw (DCException);
141 H5Handle
get(Dimensions mpiPos)
throw (DCException);
148 void registerFileCreate(FileCreateCallback callback,
void *userData);
155 void registerFileOpen(FileOpenCallback callback,
void *userData);
162 void registerFileClose(FileCloseCallback callback,
void *userData);
168 std::string filename;
169 FileNameScheme fileNameScheme;
171 hid_t fileAccProperties;
175 IndexCtrStr leastAccIndex;
176 std::set<uint32_t> createdFiles;
179 FileCreateCallback fileCreateCallback;
180 void *fileCreateUserData;
181 FileOpenCallback fileOpenCallback;
182 void *fileOpenUserData;
183 FileCloseCallback fileCloseCallback;
184 void *fileCloseUserData;
186 static std::string getExceptionString(std::string func,
187 std::string msg,
const char *info);
189 uint32_t indexFromPos(Dimensions& mpiPos);
190 Dimensions posFromIndex(uint32_t index);