File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ namespace Core
6868 * @brief Writes probe data to the export.
6969 *
7070 * @param data A span of constant doubles containing the probe measurements.
71+ * @throw out_or_range if probe_name not already registered
7172 */
7273 void write_probe (const std::string& probe_name,
7374 std::span<const double > data);
Original file line number Diff line number Diff line change @@ -79,16 +79,14 @@ namespace Core
7979 export_counter++;
8080 }
8181
82- // TODO add ProbeType argument to select correct array depending on type + add
83- // 2 probes_count_n_element.
84- // Change probe_counter_n_element to std::vector<std::size_t> where size is
85- // number of probe type
8682 void
8783 PartialExporter::write_probe (const std::string& probe_name,
8884 std::span<const double > data)
8985 {
9086 std::string data_set_name = IO::format (" probes/" , probe_name);
91- auto & counter = this ->probe_counter_n_element [probe_name];
87+
88+ auto & counter
89+ = this ->probe_counter_n_element .at (probe_name); // Throw if bad name
9290
9391 append_array (data_set_name, data, counter);
9492 counter += data.size ();
You can’t perform that action at this time.
0 commit comments