diff --git a/src/common_io.c b/src/common_io.c index e4db20223f0758c0deb4da88f6c6c6c157c791c3..eea1d91fe2375190e15453e04d7075c976afafea 100644 --- a/src/common_io.c +++ b/src/common_io.c @@ -596,6 +596,36 @@ void io_write_meta_data(hid_t h_file, const struct engine* e, parser_write_params_to_hdf5(e->parameter_file, h_grp, /*write_used=*/0); H5Gclose(h_grp); + /* Print the recording triggers */ + h_grp = H5Gcreate(h_file, "/RecordingTriggers", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + if (h_grp < 0) error("Error while creating recording triggers group"); + if (num_snapshot_triggers_part) { + io_write_attribute(h_grp, "DesiredRecordingTimesGas", DOUBLE, + e->snapshot_recording_triggers_desired_part, + num_snapshot_triggers_part); + io_write_attribute(h_grp, "ActualRecordingTimesGas", DOUBLE, + e->snapshot_recording_triggers_part, + num_snapshot_triggers_part); + } + if (num_snapshot_triggers_spart) { + io_write_attribute(h_grp, "DesiredRecordingTimesStars", DOUBLE, + e->snapshot_recording_triggers_desired_spart, + num_snapshot_triggers_spart); + io_write_attribute(h_grp, "ActualRecordingTimesStars", DOUBLE, + e->snapshot_recording_triggers_spart, + num_snapshot_triggers_spart); + } + if (num_snapshot_triggers_bpart) { + io_write_attribute(h_grp, "DesiredRecordingTimesBlackHoles", DOUBLE, + e->snapshot_recording_triggers_desired_bpart, + num_snapshot_triggers_bpart); + io_write_attribute(h_grp, "ActualRecordingTimesBlackHoles", DOUBLE, + e->snapshot_recording_triggers_bpart, + num_snapshot_triggers_bpart); + } + H5Gclose(h_grp); + /* Print the system of Units used in the spashot */ io_write_unit_system(h_file, snapshot_units, "Units");