summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-20 11:08:34 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-20 11:08:34 (GMT)
commit4a0a2dc5172e5e2566ea30e902acb6c45140118a (patch)
tree439da2f7da6c4fe72e4d64edfed5d40bf3a3be53 /include
parent35a34ebad5acdedaccb8ee24274c68dc8df5f71f (diff)
Added function to read only data from specific block ID from current frame set.
Fixed a lot of bugs regarding reading next frame one at a time.
Diffstat (limited to 'include')
-rw-r--r--include/tng_io.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/tng_io.h b/include/tng_io.h
index 9a6cfa7..e39797f 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -2038,7 +2038,27 @@ tng_function_status DECLSPECDLLEXPORT tng_block_read_next
(tng_trajectory_t tng_data,
tng_gen_block_t block_data,
const char hash_mode);
-
+/**
+ * @brief Read data from the current frame set from the input_file. Only read
+ * particle mapping and data blocks matching the specified block_id.
+ * @param tng_data is a trajectory data container.
+ * @details tng_data->input_file_path specifies
+ * which file to read from. If the file (input_file) is not open it will be
+ * opened.
+ * @param hash_mode is an option to decide whether to use the md5 hash or not.
+ * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
+ * compared to the md5 hash of the read contents to ensure valid data.
+ * @param block_id is the ID of the data block to read from file.
+ * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
+ * must be initialised before using it.
+ * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ * has occurred or TNG_CRITICAL (2) if a major error has occured.
+ */
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_block_id
+ (tng_trajectory_t tng_data,
+ const char hash_mode,
+ const int64_t block_id);
+
/**
* @brief Read one (the next) frame set, including particle mapping and related data blocks
* from the input_file of tng_data.
contact: Jan Huwald // Impressum