- JFJochReceiverFPGA no longer attaches the uncompressed image before the analysis; only the removed CPU integrator read it. - JFJochReceiverFPGA drops its branches for a run with no images; pedestal runs have their own receiver and a standard run has at least one image. - SummationThread returns nothing instead of an unused 0. - JFJochReceiverOutput loses master_file_name and images_written (never set or never read), the base receiver its always-empty images_written. - JFJochReceiverCurrentStatus::SetEfficiency is gone: its only call was overwritten on the next line. - ImageMetadata::IsBunchIDConsistent had no caller; an inconsistent frame still gets pulse ID UINT64_MAX. - DarkMaskAnalysis::AnalyzeImage takes the decompression buffer by reference, so the per-thread buffer of the dark mask receiver is reused. - The pedestal and dark mask receivers no longer take the indexer pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include <cmath>
|
|
#include "JFJochReceiverCurrentStatus.h"
|
|
|
|
std::optional<JFJochReceiverStatus> JFJochReceiverCurrentStatus::GetStatus() const {
|
|
std::unique_lock ul(m);
|
|
return status;
|
|
}
|
|
|
|
void JFJochReceiverCurrentStatus::Clear() {
|
|
std::unique_lock ul(m);
|
|
status.reset();
|
|
}
|
|
|
|
void JFJochReceiverCurrentStatus::SetStatus(const JFJochReceiverStatus &in_status) {
|
|
std::unique_lock ul(m);
|
|
status = in_status;
|
|
}
|
|
|
|
std::optional<float> JFJochReceiverCurrentStatus::GetProgress() const {
|
|
float tmp = progress;
|
|
if (std::isnan(tmp))
|
|
return {};
|
|
else
|
|
return tmp;
|
|
}
|
|
|
|
void JFJochReceiverCurrentStatus::SetProgress(std::optional<float> input) {
|
|
if (input.has_value()) {
|
|
if (input.value() < 0.0)
|
|
progress = 0.0;
|
|
else if (input.value() > 1.0)
|
|
progress = 1.0;
|
|
else
|
|
progress = input.value();
|
|
} else
|
|
progress = NAN;
|
|
}
|