From 44e6ea18b3a0da6fde95d39d2ca01bf65b359dd9 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Thu, 28 Jun 2018 15:17:36 +0200 Subject: [PATCH] Additional logging --- src/H5Writer.cpp | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/H5Writer.cpp b/src/H5Writer.cpp index 6dd41ba..759215a 100644 --- a/src/H5Writer.cpp +++ b/src/H5Writer.cpp @@ -83,30 +83,37 @@ void H5Writer::close_file() void H5Writer::write_data(const string& dataset_name, const size_t data_index, const char* data, const std::vector& data_shape, const size_t data_bytes_size, const string& data_type, const string& endianness) { - // Define the ofset of the currently received image in the file. - hsize_t relative_data_index = prepare_storage_for_data(dataset_name, data_index, data_shape, data_type, endianness); + try { - // Define the offset where to write the data. - size_t data_rank = data_shape.size(); - hsize_t offset[data_rank+1]; - - offset[0] = relative_data_index; - for (uint index=0; index