JFJochReceiver: Plot is C++ struct
This commit is contained in:
@@ -16,11 +16,13 @@ const std::vector<uint64_t> &ADUHistogram::GetHistogram() const {
|
||||
return histogram;
|
||||
}
|
||||
|
||||
void ADUHistogram::GetPlot(JFJochProtoBuf::Plot &plot) const {
|
||||
Plot ADUHistogram::GetPlot() const {
|
||||
std::unique_lock<std::mutex> ul(m);
|
||||
|
||||
Plot ret;
|
||||
ret.x.resize(ADU_HISTO_BIN_COUNT);
|
||||
ret.y.resize(ADU_HISTO_BIN_COUNT);
|
||||
for (int i = 0; i < ADU_HISTO_BIN_COUNT; i++) {
|
||||
plot.add_x(ADU_HISTO_BIN_WIDTH * i + ADU_HISTO_BIN_WIDTH / 2);
|
||||
plot.add_y(histogram[i]);
|
||||
ret.x[i] = ADU_HISTO_BIN_WIDTH * i + ADU_HISTO_BIN_WIDTH / 2;
|
||||
ret.y[i] = histogram[i];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user