- 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
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <mutex>
|
|
|
|
#include "../fpga/pcie_driver/jfjoch_fpga.h"
|
|
#include "../common/JFJochMessages.h"
|
|
#include "../common/DiffractionExperiment.h"
|
|
|
|
class ImageMetadata {
|
|
mutable std::mutex m;
|
|
|
|
bool pulsed_source;
|
|
|
|
bool first_module_loaded = false;
|
|
|
|
uint64_t xfel_pulse_id = UINT64_MAX;
|
|
uint64_t xfel_event_code = 0;
|
|
|
|
uint64_t jf_info = 0;
|
|
uint64_t timestamp = 0;
|
|
uint64_t exptime = 0;
|
|
uint64_t storage_cell = 0;
|
|
uint64_t saturated_pixels = 0;
|
|
uint64_t error_pixels = 0;
|
|
int64_t pixel_sum = 0;
|
|
|
|
int64_t max_value = INT64_MIN;
|
|
int64_t min_value = INT64_MAX;
|
|
|
|
uint64_t strong_pixels = 0;
|
|
uint64_t packets_collected = 0;
|
|
|
|
std::map<std::string, ROIMessage> rois;
|
|
std::map<std::string, uint16_t> roi_map_name;
|
|
|
|
const DetectorGeometry &geom;
|
|
public:
|
|
explicit ImageMetadata(const DiffractionExperiment &experiment);
|
|
void Process(const DeviceOutput *output);
|
|
void Export(DataMessage &message, uint64_t packets_expected_per_image) const;
|
|
};
|