Build Packages / Build documentation (push) Successful in 45s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 28m34s
Build Packages / Create release (push) Successful in 8s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 8m55s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 11m11s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 16m51s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 22m42s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 24m46s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 26m18s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 31m0s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 31m16s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 32m15s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 27m12s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 30m40s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 33m20s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 31m3s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 27m5s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 30m24s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 32m54s
Build Packages / Unit tests (push) Failing after 1h53m52s
Build Packages / Validation Battery (push) Successful in 46m47s
Comments say what the next line does or why; names follow the rest of the receiver: <thing>_mutex, thread bodies <What>Thread (FPGAImagePuller: AcquireThread, ModuleThread, CompressThread, FinalizeMeasurement), no single letters for objects. Code does not change. JFJochReceiverFPGA and what the style review's "leave alone" list names (deleters, exception_ptr, the condition variables, LiveModel) stay as they were. Moved here from the comments: Pre-pass size: of 100 frames of a collection indexed at 18%, 7 indexed at a distance 2.6% off and the geometry refinement did not run; of 500, 34 did and refined it to 0.4%. With the broker's default fixed threshold 3 points fewer frames index than with the adaptive one the analysis takes. Preflight sends FillMessage alone, measured on a JUNGFRAU 9M at 1.4 kB against 543 kB for the start message, and the whole of it rather than the fields the check reads today, so the writer sees the description it will be given at start. FFT indexers and cuFFT plans are kept for the life of the broker because every pass of every collection builds the same pools, and making a plan takes a process-wide lock and took over a second on a card busy with the online analysis. The host memory budget subtracts the image buffer, which has to keep the whole collection and so is most of the machine; at worst what could run side by side runs one part after the other. The receiver is released before the indexer pool is rebuilt because a fresh GPU indexer next to a stale receiver (after a failed start the receiver is stopped but not destroyed until the next Start) can fail to initialise. ReceiveRingBuffer: one image of a large detector is tens of megabytes, so a queue of a thousand of them is a quantity of memory nobody chose. Regions are handed out and reclaimed in arrival order; a region released early is only remembered, and republish holds at most its queue's worth, so that is as far as the reclaim can lag. A message larger than the whole ring goes on the heap, so an oversized START or END cannot wedge the receiver. Republish is capped at a share of the ring because it keeps the oldest unsent images and would otherwise pin everything received after them, running the writer at the republish rate. ZMQImagePuller: with a full ring the broker's pusher waits one second, then drops the image and sends without waiting for the rest of the run, so a ring too small for the writer's stalls costs images. TCPImagePuller: a full ring blocks the pusher's send; its BUSY heartbeats tell it apart from a dead writer, and it gives up only after a minute in which no image was written. Keep-alive detection is about 60 s, both sides. Stills model step: the step on a provisional merge still running when the next merge is made is cut, one not started is replaced; a molecular replacement or a refinement not started is left out at the deadline, a refinement running is cut short; each step starts from the last placement. Without a space group stated the frames are merged in the model's where its cell is the run's consensus, otherwise the model is left out. Rotation, stills and stills with a model end to end against the build before this work: MTZ data columns, both maps, placed and refined models and blobs are byte for byte the same; only the MTZ history's build stamp differs. Scan results are the same with times stripped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
452 lines
20 KiB
C++
452 lines
20 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include "JFJochReceiverService.h"
|
|
#include "JFJochReceiverRugnuxRotation.h"
|
|
#include "JFJochReceiverRugnuxStills.h"
|
|
#include "../rugnux/RugnuxDefaults.h"
|
|
#include "../common/ThreadAffinity.h"
|
|
#include "JFJochReceiverFPGA.h"
|
|
#include "JFJochReceiverLite.h"
|
|
#include "JFJochReceiverDarkMask.h"
|
|
#include "JFJochReceiverPedestal.h"
|
|
#include "../preview/JFJochJPEG.h"
|
|
#include "../preview/JFJochTIFF.h"
|
|
|
|
JFJochReceiverService::JFJochReceiverService(AcquisitionDeviceGroup &in_aq_devices,
|
|
Logger &in_logger, ImagePusher &pusher,
|
|
size_t send_buffer_size_MiB)
|
|
: aq_devices(in_aq_devices),
|
|
logger(in_logger),
|
|
image_buffer(send_buffer_size_MiB * 1024 * 1024),
|
|
image_pusher(pusher),
|
|
spot_finding_settings(DiffractionExperiment::DefaultDataProcessingSettings()) {
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::RugnuxLive(bool enable, std::shared_ptr<const RugnuxModel> model,
|
|
int reserved_cpus, double deadline_s) {
|
|
std::unique_lock ul_state(state_mutex);
|
|
if (state != ReceiverState::Idle)
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState,
|
|
"Cannot change rugnux settings during data collection");
|
|
rugnux_enable = enable;
|
|
rugnux_model = std::move(model);
|
|
rugnux_reserved_cpus = reserved_cpus;
|
|
rugnux_deadline_s = deadline_s;
|
|
return *this;
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::UseFPGAImagePuller(bool enable, size_t slots) {
|
|
std::unique_lock ul_state(state_mutex);
|
|
if (state != ReceiverState::Idle)
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState,
|
|
"Cannot change the receiver path during data collection");
|
|
fpga_image_puller = enable;
|
|
fpga_image_puller_slots = slots;
|
|
return *this;
|
|
}
|
|
|
|
RugnuxLiveSnapshot JFJochReceiverService::GetRugnuxStatus() const {
|
|
return rugnux_status.Get();
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::NumThreads(int64_t input) {
|
|
if (input <= 0)
|
|
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Thread number must be above zero");
|
|
nthreads = input;
|
|
return *this;
|
|
}
|
|
|
|
void JFJochReceiverService::FinalizeMeasurementChangeState() {
|
|
std::unique_lock ul(state_mutex);
|
|
state = ReceiverState::Idle;
|
|
measurement_done.notify_all();
|
|
}
|
|
|
|
void JFJochReceiverService::FinalizeMeasurement() {
|
|
try {
|
|
receiver->StopReceiver();
|
|
if (fpga_puller)
|
|
fpga_puller->Stop();
|
|
} catch (...) {
|
|
FinalizeMeasurementChangeState();
|
|
throw;
|
|
}
|
|
FinalizeMeasurementChangeState();
|
|
}
|
|
|
|
std::optional<JFJochReceiverStatus> JFJochReceiverService::GetStatus() {
|
|
return receiver_status.GetStatus();
|
|
}
|
|
|
|
void JFJochReceiverService::Preflight(const DiffractionExperiment &experiment) {
|
|
// As JFJochReceiver decides whether it pushes to a writer at all
|
|
if ((experiment.GetImageNum() <= 0) || experiment.GetFilePrefix().empty())
|
|
return;
|
|
|
|
// FillMessage alone, so this frame is small: the per-pixel arrays are added by JFJochReceiver::SendStartMessage
|
|
StartMessage message{};
|
|
experiment.FillMessage(message);
|
|
image_pusher.Preflight(message);
|
|
}
|
|
|
|
void JFJochReceiverService::Start(const DiffractionExperiment &experiment,
|
|
const PixelMask &pixel_mask,
|
|
const JFCalibration *calibration,
|
|
std::shared_ptr<ImagePuller> puller) {
|
|
std::unique_lock ul_state(state_mutex); // unique lock, as it will destroy and create receiver object
|
|
if (state != ReceiverState::Idle)
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState, "Receiver not idle, cannot start");
|
|
|
|
try {
|
|
auto nthreads_local = nthreads;
|
|
if (experiment.IsCPUSummation())
|
|
nthreads_local = 4;
|
|
|
|
// First clean-up old measurement
|
|
receiver.reset();
|
|
if (fpga_puller) {
|
|
image_puller.reset();
|
|
fpga_puller.reset();
|
|
}
|
|
|
|
preview_image.Configure(experiment, pixel_mask);
|
|
|
|
// Pedestal runs and host summation stay with JFJochReceiverFPGA
|
|
bool stream_input = (experiment.GetDetectorType() == DetectorType::DECTRIS);
|
|
if (fpga_image_puller && !stream_input && (experiment.GetImageNum() > 0)) {
|
|
if (experiment.IsCPUSummation())
|
|
logger.Warning("Summation above what the card can do needs JFJochReceiverFPGA: FPGA image puller not used");
|
|
else {
|
|
fpga_puller = std::make_shared<FPGAImagePuller>(experiment, pixel_mask, calibration, aq_devices, logger,
|
|
nthreads_local, fpga_image_puller_slots);
|
|
puller = fpga_puller;
|
|
stream_input = true;
|
|
}
|
|
}
|
|
|
|
if (!stream_input && experiment.IsPedestalRun()) {
|
|
receiver = std::make_unique<JFJochReceiverPedestal>(experiment, pixel_mask,
|
|
aq_devices, image_pusher,
|
|
logger,
|
|
spot_finding_settings,
|
|
receiver_status,
|
|
plots,
|
|
image_buffer,
|
|
zmq_preview_socket.get(),
|
|
zmq_metadata_socket.get(),
|
|
indexer_thread_pool.get());
|
|
} else if (!stream_input) {
|
|
receiver = std::make_unique<JFJochReceiverFPGA>(experiment, pixel_mask,
|
|
calibration,
|
|
aq_devices, image_pusher,
|
|
logger,
|
|
nthreads_local,
|
|
spot_finding_settings,
|
|
receiver_status,
|
|
plots,
|
|
image_buffer,
|
|
zmq_preview_socket.get(),
|
|
zmq_metadata_socket.get(),
|
|
indexer_thread_pool.get());
|
|
} else {
|
|
if (puller)
|
|
image_puller = puller;
|
|
else
|
|
image_puller = std::make_shared<ZMQImagePuller>(experiment.GetDetectorSetup().GetDECTRISStream2Addr());
|
|
|
|
// The dark frames of the mask sequence have a receiver of their own, with rugnux on as well.
|
|
if (experiment.GetDetectorMode() == DetectorMode::DarkMask)
|
|
receiver = std::make_unique<JFJochReceiverDarkMask>(experiment,
|
|
pixel_mask,
|
|
*image_puller,
|
|
image_pusher,
|
|
logger,
|
|
nthreads_local,
|
|
spot_finding_settings,
|
|
receiver_status,
|
|
plots,
|
|
image_buffer,
|
|
zmq_preview_socket.get(),
|
|
zmq_metadata_socket.get(),
|
|
indexer_thread_pool.get());
|
|
else if (rugnux_enable && (experiment.GetDetectorMode() == DetectorMode::Standard) && RugnuxRotationData(experiment))
|
|
receiver = std::make_unique<JFJochReceiverRugnuxRotation>(
|
|
experiment, pixel_mask, *image_puller, image_pusher, logger, nthreads_local,
|
|
std::max<int>(1, static_cast<int>(AvailableCpus()) - rugnux_reserved_cpus),
|
|
rugnux_model, rugnux_deadline_s, rugnux_status, spot_finding_settings, receiver_status, plots,
|
|
image_buffer, zmq_preview_socket.get(), zmq_metadata_socket.get());
|
|
else if (rugnux_enable && (experiment.GetDetectorMode() == DetectorMode::Standard))
|
|
receiver = std::make_unique<JFJochReceiverRugnuxStills>(
|
|
experiment, pixel_mask, *image_puller, image_pusher, logger, nthreads_local,
|
|
rugnux_model, rugnux_deadline_s, rugnux_status, spot_finding_settings, receiver_status, plots,
|
|
image_buffer, zmq_preview_socket.get(), zmq_metadata_socket.get(), indexer_thread_pool.get());
|
|
else
|
|
receiver = std::make_unique<JFJochReceiverLite>(experiment,
|
|
pixel_mask,
|
|
*image_puller,
|
|
image_pusher,
|
|
logger,
|
|
nthreads_local,
|
|
spot_finding_settings,
|
|
receiver_status,
|
|
plots,
|
|
image_buffer,
|
|
zmq_preview_socket.get(),
|
|
zmq_metadata_socket.get(),
|
|
indexer_thread_pool.get());
|
|
}
|
|
measurement = std::async(std::launch::async, &JFJochReceiverService::FinalizeMeasurement, this);
|
|
state = ReceiverState::Running;
|
|
} catch (const std::exception &e) {
|
|
receiver.reset(); // its threads may be polling the puller reset below
|
|
// The receiver never started: /status must not keep reporting a run that never happened
|
|
receiver_status.Clear();
|
|
receiver_status.SetProgress({});
|
|
if (fpga_puller) {
|
|
image_puller.reset();
|
|
fpga_puller.reset();
|
|
}
|
|
logger.ErrorException(e);
|
|
throw;
|
|
}
|
|
}
|
|
|
|
void JFJochReceiverService::Cancel(bool silent) {
|
|
std::unique_lock ul(state_mutex);
|
|
if (state == ReceiverState::Running) {
|
|
receiver->Cancel(silent);
|
|
if (fpga_puller)
|
|
fpga_puller->Cancel();
|
|
}
|
|
}
|
|
|
|
JFJochReceiverOutput JFJochReceiverService::Stop() {
|
|
std::unique_lock ul(state_mutex);
|
|
|
|
measurement_done.wait(ul, [this] { return (state != ReceiverState::Running); });
|
|
|
|
if (state != ReceiverState::Idle)
|
|
throw JFJochException(JFJochExceptionCategory::WrongReceiverState, "Receiver in weird state");
|
|
|
|
try {
|
|
if (measurement.valid())
|
|
measurement.get();
|
|
} catch (JFJochException &e) {
|
|
logger.ErrorException(e);
|
|
throw;
|
|
}
|
|
|
|
if (!receiver) {
|
|
logger.Warning("Request to stop while receiver not running");
|
|
throw JFJochException(JFJochExceptionCategory::WrongReceiverState, "Receiver idle, cannot stop");
|
|
}
|
|
return receiver->GetFinalStatistics();
|
|
}
|
|
|
|
void JFJochReceiverService::SetSpotFindingSettings(const SpotFindingSettings &settings) {
|
|
try {
|
|
std::unique_lock ul(state_mutex);
|
|
DiffractionExperiment::CheckDataProcessingSettings(settings);
|
|
spot_finding_settings = settings;
|
|
if (state != ReceiverState::Idle)
|
|
receiver->SetSpotFindingSettings(settings);
|
|
} catch (std::exception &e) {
|
|
logger.ErrorException(e);
|
|
throw;
|
|
}
|
|
}
|
|
|
|
MultiLinePlot JFJochReceiverService::GetDataProcessingPlot(const PlotRequest &request) {
|
|
return plots.GetPlots(request);
|
|
}
|
|
|
|
void JFJochReceiverService::GetPlotRaw(std::vector<float> &v, PlotType type, const std::string &roi) {
|
|
plots.GetPlotRaw(v, type, roi);
|
|
}
|
|
|
|
|
|
std::vector<AcquisitionDeviceNetConfig> JFJochReceiverService::GetNetworkConfig() {
|
|
return aq_devices.GetNetworkConfig();
|
|
}
|
|
|
|
void JFJochReceiverService::LoadInternalGeneratorImage(const DiffractionExperiment &experiment,
|
|
const std::vector<uint16_t> &image,
|
|
uint64_t image_number) {
|
|
std::vector<uint16_t> raw_geom, eiger_geom;
|
|
|
|
const uint16_t *frame;
|
|
if (image.size() == RAW_MODULE_SIZE * experiment.GetModulesNum()) {
|
|
frame = image.data();
|
|
} else if (image.size() == experiment.GetPixelsNum()) {
|
|
raw_geom.resize(RAW_MODULE_SIZE * experiment.GetModulesNum());
|
|
ConvertedToRawGeometry(experiment, raw_geom.data(), image.data());
|
|
frame = raw_geom.data();
|
|
} else
|
|
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
|
"Size of input array with raw expected image is wrong");
|
|
|
|
for (int i = 0; i < experiment.GetDataStreamsNum(); i++) {
|
|
uint32_t module0 = experiment.GetFirstModuleOfDataStream(i);
|
|
switch (experiment.GetDetectorSetup().GetDetectorType()) {
|
|
case DetectorType::EIGER:
|
|
eiger_geom.resize(RAW_MODULE_SIZE);
|
|
for (int m = 0; m < experiment.GetModulesNum(i); m++) {
|
|
RawToEigerInput(eiger_geom.data(), frame + (module0 + m) * RAW_MODULE_SIZE);
|
|
aq_devices[i].SetInternalGeneratorFrame(eiger_geom.data(),
|
|
m + experiment.GetModulesNum(i) * image_number);
|
|
}
|
|
break;
|
|
case DetectorType::JUNGFRAU:
|
|
for (int m = 0; m < experiment.GetModulesNum(i); m++)
|
|
aq_devices[i].SetInternalGeneratorFrame(frame + (module0 + m) * RAW_MODULE_SIZE,
|
|
m + experiment.GetModulesNum(i) * image_number);
|
|
break;
|
|
default:
|
|
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Detector not supported");
|
|
}
|
|
}
|
|
}
|
|
|
|
void JFJochReceiverService::GetXFELEventCode(std::vector<uint64_t> &v) const {
|
|
plots.GetXFELEventCode(v);
|
|
}
|
|
|
|
void JFJochReceiverService::GetXFELPulseID(std::vector<uint64_t> &v) const {
|
|
plots.GetXFELPulseID(v);
|
|
}
|
|
|
|
std::vector<DeviceStatus> JFJochReceiverService::GetDeviceStatus() const {
|
|
return aq_devices.GetDeviceStatus();
|
|
}
|
|
|
|
std::optional<float> JFJochReceiverService::GetProgress() const {
|
|
return receiver_status.GetProgress();
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::PreviewSocket(const std::string &addr, const std::optional<int32_t> &watermark) {
|
|
if (!addr.empty()) {
|
|
logger.Info("ZeroMQ preview socket available at {}", addr);
|
|
zmq_preview_socket = std::make_unique<ZMQPreviewSocket>(addr, watermark);
|
|
}
|
|
return *this;
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::MetadataSocket(const std::string &addr) {
|
|
if (!addr.empty()) {
|
|
logger.Info("ZeroMQ metadata socket available at {}", addr);
|
|
zmq_metadata_socket = std::make_unique<ZMQMetadataSocket>(addr);
|
|
}
|
|
return *this;
|
|
}
|
|
|
|
std::string JFJochReceiverService::GetPreviewSocketAddress() const {
|
|
if (zmq_preview_socket)
|
|
return zmq_preview_socket->GetAddress();
|
|
return "";
|
|
}
|
|
|
|
std::string JFJochReceiverService::GetMetadataSocketAddress() const {
|
|
if (zmq_metadata_socket)
|
|
return zmq_metadata_socket->GetAddress();
|
|
return "";
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::PreviewSocketSettings(const ZMQPreviewSettings &input) {
|
|
if (zmq_preview_socket)
|
|
zmq_preview_socket->ImportSettings(input);
|
|
return *this;
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::MetadataSocketSettings(const ZMQMetadataSettings &input) {
|
|
if (zmq_metadata_socket)
|
|
zmq_metadata_socket->ImportSettings(input);
|
|
return *this;
|
|
}
|
|
|
|
ZMQPreviewSettings JFJochReceiverService::GetPreviewSocketSettings() const {
|
|
if (zmq_preview_socket)
|
|
return zmq_preview_socket->GetSettings();
|
|
return {};
|
|
}
|
|
|
|
ZMQMetadataSettings JFJochReceiverService::GetMetadataSocketSettings() const {
|
|
if (zmq_metadata_socket)
|
|
return zmq_metadata_socket->GetSettings();
|
|
return {};
|
|
}
|
|
|
|
void JFJochReceiverService::GetStartMessageFromBuffer(std::vector<uint8_t> &v) {
|
|
image_buffer.GetStartMessage(v);
|
|
}
|
|
|
|
bool JFJochReceiverService::GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number) {
|
|
return image_buffer.GetImage(v, image_number);
|
|
}
|
|
|
|
std::string JFJochReceiverService::GetJPEGFromBuffer(const PreviewImageSettings &settings, int64_t image_number) {
|
|
std::vector<uint8_t> cbor_image;
|
|
if (!image_buffer.GetImage(cbor_image, image_number))
|
|
return {};
|
|
return preview_image.GenerateImage(settings, cbor_image);
|
|
}
|
|
|
|
std::string JFJochReceiverService::GetTIFFFromBuffer(int64_t image_number) {
|
|
std::vector<uint8_t> cbor_image;
|
|
if (!image_buffer.GetImage(cbor_image, image_number))
|
|
return {};
|
|
return PreviewImage::GenerateTIFF(cbor_image);
|
|
}
|
|
|
|
ImageBufferStatus JFJochReceiverService::GetImageBufferStatus() const {
|
|
return image_buffer.GetStatus();
|
|
}
|
|
|
|
void JFJochReceiverService::ClearResults() {
|
|
std::unique_lock ul(state_mutex);
|
|
if (state != ReceiverState::Idle)
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState,
|
|
"Cannot clear results during data collection");
|
|
receiver_status.Clear();
|
|
receiver_status.SetProgress({});
|
|
plots.Clear();
|
|
rugnux_status.Clear();
|
|
image_buffer.Finalize(std::chrono::milliseconds(2500));
|
|
}
|
|
|
|
void JFJochReceiverService::ClearImageBuffer() {
|
|
std::unique_lock ul(state_mutex);
|
|
// Clearing image buffer during data collection could be catastrophic, so better protect here
|
|
if (state == ReceiverState::Idle)
|
|
image_buffer.Finalize(std::chrono::milliseconds(2500));
|
|
else
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState,
|
|
"Cannot clear image buffer during data collection");
|
|
}
|
|
|
|
JFJochReceiverService &JFJochReceiverService::Indexing(const IndexingSettings &input) {
|
|
std::unique_lock ul(state_mutex);
|
|
// Clearing image buffer during data collection could be catastrophic, so better protect here
|
|
if (state == ReceiverState::Idle) {
|
|
// The receiver goes first: it holds a raw pointer to the pool, and a stale one's GPU resources can fail the new indexers
|
|
receiver.reset();
|
|
|
|
logger.Info("Resetting indexing thread pool");
|
|
indexer_thread_pool.reset();
|
|
|
|
if (input.GetAlgorithm() != IndexingAlgorithmEnum::None) {
|
|
logger.Info("Creating indexing thread pool...");
|
|
indexer_thread_pool = std::make_unique<IndexerThreadPool>(input);
|
|
logger.Info(" ... done");
|
|
}
|
|
return *this;
|
|
} else
|
|
throw JFJochException(JFJochExceptionCategory::WrongDAQState,
|
|
"Cannot change indexing settings during data collection");
|
|
}
|
|
|
|
|
|
ImagePusherStatus JFJochReceiverService::GetImagePusherStatus() const {
|
|
return image_pusher.GetStatus();
|
|
}
|