jfjoch_broker: Improve API to get raw plot (for viewer and other applications)
This commit is contained in:
@@ -51,14 +51,9 @@ int32_t StatusVector::GetActualBinning(int32_t bin_size) const {
|
||||
return bin_size;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::vector<float> StatusVector::ExportArray(float def_value) const {
|
||||
[[nodiscard]] std::vector<float> StatusVector::ExportArray() const {
|
||||
std::unique_lock ul(m);
|
||||
std::vector<float> ret(content.size(), def_value);
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
if (std::isfinite(content[i]))
|
||||
ret[i] = content[i];
|
||||
}
|
||||
return ret;
|
||||
return content;
|
||||
}
|
||||
|
||||
[[nodiscard]] float StatusVector::Mean() const {
|
||||
@@ -234,9 +229,9 @@ MultiLinePlot StatusMultiVector::GetMeanPlot(int64_t bin_size, float x_start, fl
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<float> StatusMultiVector::ExportArray(const std::string &s, float def_value) const {
|
||||
std::vector<float> StatusMultiVector::ExportArray(const std::string &s) const {
|
||||
auto iter = status.find(s);
|
||||
if (iter == status.end() || !iter->second)
|
||||
return {};
|
||||
return iter->second->ExportArray(def_value);
|
||||
return iter->second->ExportArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user