Compare commits

..

2 Commits

Author SHA1 Message Date
7a23eade30 Merge branch '2410-pedestal-no-window' into 'main'
version 1.0.0-rc.14

See merge request jungfraujoch/nextgendcu!79
2024-10-07 11:56:40 +02:00
3be959f272 version 1.0.0-rc.14 2024-10-07 11:56:40 +02:00
217 changed files with 1299 additions and 2429 deletions

View File

@@ -268,41 +268,6 @@ synthesis:vivado_pcie_100g:
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
needs: ["build:x86:gcc", "test:x86:gcc"]
synthesis:vivado_pcie_100g_anlt:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- fpga/hls/*
- fpga/hdl/*
- fpga/scripts/*
- fpga/xdc/*
- fpga/pcie_driver/jfjoch_fpga.h
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
allow_failure: true
tags:
- vivado
retry: 2
artifacts:
paths:
- "jfjoch_fpga_pcie_100g_anlt.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- touch jfjoch_fpga_pcie_100g.mcs
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_100g_anlt
- mv fpga/jfjoch_fpga_pcie_100g_anlt.mcs ..
needs: ["build:x86:gcc", "test:x86:gcc"]
synthesis:vivado_pcie_8x10g:
stage: synthesis
dependencies: []
@@ -348,7 +313,6 @@ release:
dependencies:
- synthesis:vivado_pcie_8x10g
- synthesis:vivado_pcie_100g
- synthesis:vivado_pcie_100g_anlt
- build:x86:frontend
- build:x86:driver
- build:x86:rpm
@@ -362,7 +326,6 @@ release:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_driver.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_driver.tar.gz"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_frontend.tar.gz "${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_100g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_100g_anlt.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g_anlt.mcs"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_8x10g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs"'
- >
release-cli create --name "Release $PACKAGE_VERSION_SEM" --tag-name $PACKAGE_VERSION_SEM
@@ -370,7 +333,6 @@ release:
--assets-link "{\"name\":\"jfjoch_frontend.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_frontend.tar.gz\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_8x10g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g_anlt.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g_anlt.mcs\"}"
--assets-link "{\"name\":\"jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
--assets-link "{\"name\":\"jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-writer-${PACKAGE_VERSION}-1.el8.x86_64.rpm\",\"link_type\":\"package\"}"
--assets-link "{\"name\":\"jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"link_type\":\"package\"}"
@@ -404,7 +366,6 @@ release_no_fpga:
--assets-link "{\"name\":\"jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch-driver-dkms-${PACKAGE_VERSION}-1.el8.noarch.rpm\",\"link_type\":\"package\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_8x10g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g.mcs\"}"
--assets-link "{\"name\":\"jfjoch_fpga_pcie_100g_anlt.mcs\",\"url\":\"${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g_anlt.mcs\"}"
upload_fpga_100g:
stage: release
@@ -455,28 +416,3 @@ upload_fpga_8x10g:
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_8x10g.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_8x10g.mcs"'
upload_fpga_100g_anlt:
stage: release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
when: manual
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- fpga/hls/*
- fpga/hdl/*
- fpga/scripts/*
- fpga/xdc/*
- fpga/pcie_driver/jfjoch_fpga.h
when: manual
tags:
- x86
dependencies:
- synthesis:vivado_pcie_100g_anlt
script:
- export PACKAGE_VERSION_SEM=`head -n1 VERSION`
- export PACKAGE_VERSION=${PACKAGE_VERSION_SEM//-/_}
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/jungfraujoch/${PACKAGE_VERSION_SEM}"
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file jfjoch_fpga_pcie_100g_anlt.mcs "${PACKAGE_REGISTRY_URL}/jfjoch_fpga_pcie_100g_anlt.mcs"'

View File

@@ -1 +1 @@
1.0.0-rc.13
1.0.0-rc.14

View File

@@ -41,17 +41,6 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_
void AcquisitionCounters::UpdateCounters(const Completion *c) {
std::unique_lock<std::shared_mutex> ul(m);
if (c->pedestal) {
if (c->module_number >= nmodules)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"UpdateCounters wrong module number: " + std::to_string(c->module_number) + " for pedestal SC" + std::to_string(c->frame_number));
if (c->frame_number >= 16)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"UpdateCounters pedestal frame number is out of bounds for storage cells");
handle_for_pedestal.at(c->frame_number * nmodules + c->module_number) = c->handle;
return;
}
if (c->module_number >= nmodules)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"UpdateCounters wrong module number: " + std::to_string(c->module_number) + " for frame " + std::to_string(c->frame_number) +

View File

@@ -75,7 +75,7 @@ void AcquisitionDevice::StartAction(const DiffractionExperiment &experiment, uin
RunInternalGenerator(experiment);
}
void AcquisitionDevice::WaitForActionComplete(bool pedestal_mode) {
void AcquisitionDevice::WaitForActionComplete() {
auto c = work_completion_queue.GetBlocking();
while (c.type != Completion::Type::End) {
@@ -92,9 +92,8 @@ void AcquisitionDevice::WaitForActionComplete(bool pedestal_mode) {
c.module_number = output->module_statistics.module_number;
c.packet_count = output->module_statistics.packet_count;
c.frame_number = output->module_statistics.frame_number;
c.pedestal = output->module_statistics.pedestal;
if ((c.frame_number >= expected_frames) && !c.pedestal) {
if (c.frame_number >= expected_frames) {
Cancel();
// this frame is not of any interest, therefore its location can be immediately released
SendWorkRequest(c.handle);
@@ -104,14 +103,6 @@ void AcquisitionDevice::WaitForActionComplete(bool pedestal_mode) {
logger->Error("Completion with wrong module number data stream {} completion frame number {} module {} handle {}",
data_stream, c.frame_number, c.module_number, c.handle);
SendWorkRequest(c.handle);
} else if (pedestal_mode && !c.pedestal) {
try {
counters.UpdateCounters(&c);
} catch (const JFJochException &e) {
if (logger)
logger->ErrorException(e);
}
SendWorkRequest(c.handle);
} else {
try {
counters.UpdateCounters(&c);
@@ -152,14 +143,6 @@ const DeviceOutput *AcquisitionDevice::GetDeviceOutput(size_t frame_number, uint
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Frame not collected");
}
const DeviceOutput *AcquisitionDevice::GetDeviceOutputPedestal(size_t storage_cell, uint16_t module_number) const {
auto handle = counters.GetPedestalBufferHandle(storage_cell, module_number);
if (handle != HandleNotValid)
return GetDeviceOutput(handle);
else
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Frame not collected");
}
const DeviceOutput *AcquisitionDevice::GetDeviceOutput(size_t handle) const {
if (handle >= buffer_device.size())
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Handle outside of range");

View File

@@ -75,7 +75,7 @@ public:
void StartAction(const DiffractionExperiment &experiment, uint32_t optional_flags = 0);
void PrepareAction(const DiffractionExperiment &experiment);
void WaitForActionComplete(bool pedestal_mode = false);
void WaitForActionComplete();
virtual void Cancel() = 0;
void EnableLogging(Logger *logger);
@@ -87,7 +87,6 @@ public:
virtual DeviceStatus GetDeviceStatus() const;
AcquisitionDeviceStatistics GetStatistics() const;
const DeviceOutput *GetDeviceOutput(size_t frame_number, uint16_t module_number) const;
const DeviceOutput *GetDeviceOutputPedestal(size_t frame_number, uint16_t module_number) const;
void FrameBufferRelease(size_t frame_number, uint16_t module_number);
// Calibration

View File

@@ -17,7 +17,6 @@ struct Completion {
uint16_t packet_count;
uint16_t data_collection_id;
uint16_t module_number;
bool pedestal;
};
Completion parse_hw_completion(uint32_t hw_input);

View File

@@ -41,9 +41,6 @@ class FPGAAcquisitionDevice : public AcquisitionDevice {
protected:
std::vector<uint16_t> internal_pkt_gen_frame;
explicit FPGAAcquisitionDevice(uint16_t data_stream);
virtual void HW_GetEnvParams(DeviceStatus *status) const {
memset(status, 0, sizeof(DeviceStatus));
}
public:
void InitializeCalibration(const DiffractionExperiment &experiment, const JFCalibration &calib) override;
void InitializeIntegrationMap(const DiffractionExperiment &experiment, const std::vector<uint16_t> &v,

View File

@@ -102,3 +102,19 @@ uint32_t HLSSimulatedDevice::HW_GetDataSource() {
void HLSSimulatedDevice::CreateXfelBunchIDPacket(double pulse_id, uint32_t event_code) {
device->CreateXfelBunchIDPacket(pulse_id, event_code);
}
DeviceStatus HLSSimulatedDevice::GetDeviceStatus() const {
DeviceStatus status{};
strncpy(status.serial_number, "HLS1", sizeof(status.device_number));
strncpy(status.device_number, "HLS device", sizeof(status.device_number));
status.fpga_default_mac_addr = mac_addr;
status.eth_link_count = 1;
status.eth_link_status = 1;
status.packets_sls = device->GetSLSPackets();
status.packets_udp = device->GetUDPPackets();
status.hbm_0_temp_C = 0;
status.hbm_1_temp_C = 0;
status.fpga_temp_C = 0;
return status;
}

View File

@@ -40,6 +40,7 @@ public:
void CreateFinalPacket(const DiffractionExperiment& experiment);
DataCollectionStatus GetDataCollectionStatus() const override;
void Cancel() override;
DeviceStatus GetDeviceStatus() const override;
};

View File

@@ -70,10 +70,6 @@ std::string PCIExpressDevice::GetMACAddress() const {
return MacAddressToStr(dev.GetMACAddress());
}
void PCIExpressDevice::HW_GetEnvParams(DeviceStatus *status) const {
*status = dev.GetDeviceStatus();
}
uint32_t PCIExpressDevice::GetNumKernelBuffers() const {
return dev.GetBufferCount();
}

View File

@@ -28,8 +28,6 @@ public:
PCIExpressDevice(uint16_t data_stream, const std::string &device_name);
void Cancel() override;
void HW_GetEnvParams(DeviceStatus *status) const override;
int32_t GetNUMANode() const override;
void SetIPv4Address(uint32_t ipv4_addr_network_order) override;

View File

@@ -137,16 +137,8 @@ void JFJochBrokerHttp::config_spot_finding_put(
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::plot_indexing_rate_per_file_get(Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::IndexingRatePerTimePoint, 0, response);
}
void JFJochBrokerHttp::plot_azim_int_get(Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::RadInt, 0, response);
}
void JFJochBrokerHttp::plot_azim_int_per_file_get(Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::RadIntPerTimePoint, 0, response);
GenericPlot(PlotType::AzInt, 0, response);
}
void JFJochBrokerHttp::statistics_calibration_get(Pistache::Http::ResponseWriter &response) {

View File

@@ -77,11 +77,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void plot_strong_pixel_get(const std::optional<int32_t> &binning,
Pistache::Http::ResponseWriter &response) override;
void plot_indexing_rate_per_file_get(Pistache::Http::ResponseWriter &response) override;
void plot_azim_int_get(Pistache::Http::ResponseWriter &response) override;
void plot_azim_int_per_file_get(Pistache::Http::ResponseWriter &response) override;
void plot_azim_int_get(Pistache::Http::ResponseWriter &response) override;
void statistics_calibration_get(Pistache::Http::ResponseWriter &response) override;

View File

@@ -97,6 +97,8 @@ DetectorSettings Convert(const org::openapitools::server::model::Detector_settin
ret.PedestalG0Frames(input.getPedestalG0Frames());
ret.PedestalG1Frames(input.getPedestalG1Frames());
ret.PedestalG2Frames(input.getPedestalG2Frames());
ret.PedestalMinImageCount(input.getPedestalMinImageCount());
ret.PedestalG0RMSLimit(input.getPedestalG0RmsLimit());
ret.DetectorDelay(std::chrono::nanoseconds(input.getDetectorTriggerDelayNs()));
return ret;
@@ -117,6 +119,7 @@ org::openapitools::server::model::Detector_settings Convert(const DetectorSettin
ret.setPedestalG0Frames(input.GetPedestalG0Frames());
ret.setPedestalG1Frames(input.GetPedestalG1Frames());
ret.setPedestalG2Frames(input.GetPedestalG2Frames());
ret.setPedestalMinImageCount(input.GetPedestalMinImageCount());
ret.setStorageCellDelayNs(input.GetStorageCellDelay().count());
ret.setDetectorTriggerDelayNs(input.GetDetectorDelay().count());
@@ -463,6 +466,11 @@ std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const s
std::vector<org::openapitools::server::model::Fpga_status_inner> ret;
for (const auto &d: input) {
org::openapitools::server::model::Fpga_status_inner tmp;
tmp.setPciDevId(d.device_number);
tmp.setSerialNumber(d.serial_number);
tmp.setBaseMacAddr(MacAddressToStr(d.fpga_default_mac_addr));
tmp.setPacketsSls(d.packets_sls);
tmp.setPacketsUdp(d.packets_udp);
tmp.setEthLinkCount(d.eth_link_count);
tmp.setEthLinkStatus(d.eth_link_status);
tmp.setFpgaTempC(static_cast<float>(d.fpga_temp_C));

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -59,12 +59,10 @@ void DefaultApi::setupRoutes() {
Routes::Post(*router, base + "/initialize", Routes::bind(&DefaultApi::initialize_post_handler, this));
Routes::Post(*router, base + "/pedestal", Routes::bind(&DefaultApi::pedestal_post_handler, this));
Routes::Get(*router, base + "/plot/azim_int", Routes::bind(&DefaultApi::plot_azim_int_get_handler, this));
Routes::Get(*router, base + "/plot/azim_int_per_file", Routes::bind(&DefaultApi::plot_azim_int_per_file_get_handler, this));
Routes::Get(*router, base + "/plot/bkg_estimate", Routes::bind(&DefaultApi::plot_bkg_estimate_get_handler, this));
Routes::Get(*router, base + "/plot/error_pixel", Routes::bind(&DefaultApi::plot_error_pixel_get_handler, this));
Routes::Get(*router, base + "/plot/image_collection_efficiency", Routes::bind(&DefaultApi::plot_image_collection_efficiency_get_handler, this));
Routes::Get(*router, base + "/plot/indexing_rate", Routes::bind(&DefaultApi::plot_indexing_rate_get_handler, this));
Routes::Get(*router, base + "/plot/indexing_rate_per_file", Routes::bind(&DefaultApi::plot_indexing_rate_per_file_get_handler, this));
Routes::Get(*router, base + "/plot/receiver_delay", Routes::bind(&DefaultApi::plot_receiver_delay_get_handler, this));
Routes::Get(*router, base + "/plot/receiver_free_send_buffers", Routes::bind(&DefaultApi::plot_receiver_free_send_buffers_get_handler, this));
Routes::Get(*router, base + "/plot/roi_max_count", Routes::bind(&DefaultApi::plot_roi_max_count_get_handler, this));
@@ -687,25 +685,6 @@ void DefaultApi::plot_azim_int_get_handler(const Pistache::Rest::Request &, Pist
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::plot_azim_int_per_file_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {
try {
this->plot_azim_int_per_file_get(response);
} catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return;
} catch (std::exception &e) {
this->handleOperationException(e, response);
return;
}
} catch (std::exception &e) {
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::plot_bkg_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
try {
@@ -822,25 +801,6 @@ void DefaultApi::plot_indexing_rate_get_handler(const Pistache::Rest::Request &r
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::plot_indexing_rate_per_file_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) {
try {
try {
this->plot_indexing_rate_per_file_get(response);
} catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()), e.what());
return;
} catch (std::exception &e) {
this->handleOperationException(e, response);
return;
}
} catch (std::exception &e) {
response.send(Pistache::Http::Code::Internal_Server_Error, e.what());
}
}
void DefaultApi::plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) {
try {

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -89,12 +89,10 @@ private:
void initialize_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void pedestal_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_azim_int_per_file_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_bkg_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_error_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_image_collection_efficiency_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_rate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_rate_per_file_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_free_send_buffers_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_max_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -339,13 +337,6 @@ private:
/// </remarks>
virtual void plot_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate radial integration profiles per file
/// </summary>
/// <remarks>
/// Radial integration plots for both the whole dataset and per file; useful for time-resolved measurements
/// </remarks>
virtual void plot_azim_int_per_file_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate background estimate plot
/// </summary>
/// <remarks>
@@ -378,13 +369,6 @@ private:
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate indexing rate per file
/// </summary>
/// <remarks>
/// Indexing rate per each of data files; useful for example for time resolved data
/// </remarks>
virtual void plot_indexing_rate_per_file_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate receiver delay plot
/// </summary>
/// <remarks>

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -31,7 +31,7 @@ Detector_settings::Detector_settings()
m_Pedestal_g1_frames = 300L;
m_Pedestal_g2_frames = 300L;
m_Pedestal_g0_rms_limit = 100L;
m_Pedestal_window_size = 128L;
m_Pedestal_min_image_count = 128L;
m_Storage_cell_delay_ns = 5000L;
m_Detector_trigger_delay_ns = 0L;
m_Detector_trigger_delay_nsIsSet = false;
@@ -171,9 +171,9 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
}
/* Pedestal_window_size */ {
const int64_t& value = m_Pedestal_window_size;
const std::string currentValuePath = _pathPrefix + ".pedestalWindowSize";
/* Pedestal_min_image_count */ {
const int64_t& value = m_Pedestal_min_image_count;
const std::string currentValuePath = _pathPrefix + ".pedestalMinImageCount";
if (value < 32ll)
@@ -247,7 +247,7 @@ bool Detector_settings::operator==(const Detector_settings& rhs) const
(getPedestalG0RmsLimit() == rhs.getPedestalG0RmsLimit())
&&
(getPedestalWindowSize() == rhs.getPedestalWindowSize())
(getPedestalMinImageCount() == rhs.getPedestalMinImageCount())
&&
(getStorageCellDelayNs() == rhs.getStorageCellDelayNs())
@@ -283,7 +283,7 @@ void to_json(nlohmann::json& j, const Detector_settings& o)
j["pedestal_g1_frames"] = o.m_Pedestal_g1_frames;
j["pedestal_g2_frames"] = o.m_Pedestal_g2_frames;
j["pedestal_g0_rms_limit"] = o.m_Pedestal_g0_rms_limit;
j["pedestal_window_size"] = o.m_Pedestal_window_size;
j["pedestal_min_image_count"] = o.m_Pedestal_min_image_count;
j["storage_cell_delay_ns"] = o.m_Storage_cell_delay_ns;
if(o.detectorTriggerDelayNsIsSet())
j["detector_trigger_delay_ns"] = o.m_Detector_trigger_delay_ns;
@@ -309,7 +309,7 @@ void from_json(const nlohmann::json& j, Detector_settings& o)
j.at("pedestal_g1_frames").get_to(o.m_Pedestal_g1_frames);
j.at("pedestal_g2_frames").get_to(o.m_Pedestal_g2_frames);
j.at("pedestal_g0_rms_limit").get_to(o.m_Pedestal_g0_rms_limit);
j.at("pedestal_window_size").get_to(o.m_Pedestal_window_size);
j.at("pedestal_min_image_count").get_to(o.m_Pedestal_min_image_count);
j.at("storage_cell_delay_ns").get_to(o.m_Storage_cell_delay_ns);
if(j.find("detector_trigger_delay_ns") != j.end())
{
@@ -410,13 +410,13 @@ void Detector_settings::setPedestalG0RmsLimit(int64_t const value)
{
m_Pedestal_g0_rms_limit = value;
}
int64_t Detector_settings::getPedestalWindowSize() const
int64_t Detector_settings::getPedestalMinImageCount() const
{
return m_Pedestal_window_size;
return m_Pedestal_min_image_count;
}
void Detector_settings::setPedestalWindowSize(int64_t const value)
void Detector_settings::setPedestalMinImageCount(int64_t const value)
{
m_Pedestal_window_size = value;
m_Pedestal_min_image_count = value;
}
int64_t Detector_settings::getStorageCellDelayNs() const
{

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -105,10 +105,10 @@ public:
int64_t getPedestalG0RmsLimit() const;
void setPedestalG0RmsLimit(int64_t const value);
/// <summary>
/// Running average window size for pedestal calculations
/// Minimum number of collected images for pedestal to consider it viable
/// </summary>
int64_t getPedestalWindowSize() const;
void setPedestalWindowSize(int64_t const value);
int64_t getPedestalMinImageCount() const;
void setPedestalMinImageCount(int64_t const value);
/// <summary>
/// Delay between two storage cells [ns]
/// </summary>
@@ -157,7 +157,7 @@ protected:
int64_t m_Pedestal_g0_rms_limit;
int64_t m_Pedestal_window_size;
int64_t m_Pedestal_min_image_count;
int64_t m_Storage_cell_delay_ns;

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,16 +21,16 @@ namespace org::openapitools::server::model
Fpga_status_inner::Fpga_status_inner()
{
m_Pci_dev_id = "";
m_Serial_number = "";
m_Base_mac_addr = "";
m_Eth_link_count = 0L;
m_Eth_link_countIsSet = false;
m_Eth_link_status = 0L;
m_Eth_link_statusIsSet = false;
m_Power_usage_W = 0.0f;
m_Power_usage_WIsSet = false;
m_Fpga_temp_C = 0.0f;
m_Fpga_temp_CIsSet = false;
m_Hbm_temp_C = 0.0f;
m_Hbm_temp_CIsSet = false;
m_Packets_udp = 0L;
m_Packets_sls = 0L;
}
@@ -53,7 +53,7 @@ bool Fpga_status_inner::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Fpga_status_inner" : pathPrefix;
return success;
}
@@ -62,20 +62,35 @@ bool Fpga_status_inner::operator==(const Fpga_status_inner& rhs) const
return
(getPciDevId() == rhs.getPciDevId())
&&
((!ethLinkCountIsSet() && !rhs.ethLinkCountIsSet()) || (ethLinkCountIsSet() && rhs.ethLinkCountIsSet() && getEthLinkCount() == rhs.getEthLinkCount())) &&
(getSerialNumber() == rhs.getSerialNumber())
&&
(getBaseMacAddr() == rhs.getBaseMacAddr())
&&
((!ethLinkStatusIsSet() && !rhs.ethLinkStatusIsSet()) || (ethLinkStatusIsSet() && rhs.ethLinkStatusIsSet() && getEthLinkStatus() == rhs.getEthLinkStatus())) &&
(getEthLinkCount() == rhs.getEthLinkCount())
&&
(getEthLinkStatus() == rhs.getEthLinkStatus())
&&
((!powerUsageWIsSet() && !rhs.powerUsageWIsSet()) || (powerUsageWIsSet() && rhs.powerUsageWIsSet() && getPowerUsageW() == rhs.getPowerUsageW())) &&
(getPowerUsageW() == rhs.getPowerUsageW())
&&
(getFpgaTempC() == rhs.getFpgaTempC())
&&
((!fpgaTempCIsSet() && !rhs.fpgaTempCIsSet()) || (fpgaTempCIsSet() && rhs.fpgaTempCIsSet() && getFpgaTempC() == rhs.getFpgaTempC())) &&
(getHbmTempC() == rhs.getHbmTempC())
&&
(getPacketsUdp() == rhs.getPacketsUdp())
&&
(getPacketsSls() == rhs.getPacketsSls())
((!hbmTempCIsSet() && !rhs.hbmTempCIsSet()) || (hbmTempCIsSet() && rhs.hbmTempCIsSet() && getHbmTempC() == rhs.getHbmTempC()))
;
}
@@ -88,49 +103,58 @@ bool Fpga_status_inner::operator!=(const Fpga_status_inner& rhs) const
void to_json(nlohmann::json& j, const Fpga_status_inner& o)
{
j = nlohmann::json::object();
if(o.ethLinkCountIsSet())
j["eth_link_count"] = o.m_Eth_link_count;
if(o.ethLinkStatusIsSet())
j["eth_link_status"] = o.m_Eth_link_status;
if(o.powerUsageWIsSet())
j["power_usage_W"] = o.m_Power_usage_W;
if(o.fpgaTempCIsSet())
j["fpga_temp_C"] = o.m_Fpga_temp_C;
if(o.hbmTempCIsSet())
j["hbm_temp_C"] = o.m_Hbm_temp_C;
j["pci_dev_id"] = o.m_Pci_dev_id;
j["serial_number"] = o.m_Serial_number;
j["base_mac_addr"] = o.m_Base_mac_addr;
j["eth_link_count"] = o.m_Eth_link_count;
j["eth_link_status"] = o.m_Eth_link_status;
j["power_usage_W"] = o.m_Power_usage_W;
j["fpga_temp_C"] = o.m_Fpga_temp_C;
j["hbm_temp_C"] = o.m_Hbm_temp_C;
j["packets_udp"] = o.m_Packets_udp;
j["packets_sls"] = o.m_Packets_sls;
}
void from_json(const nlohmann::json& j, Fpga_status_inner& o)
{
if(j.find("eth_link_count") != j.end())
{
j.at("eth_link_count").get_to(o.m_Eth_link_count);
o.m_Eth_link_countIsSet = true;
}
if(j.find("eth_link_status") != j.end())
{
j.at("eth_link_status").get_to(o.m_Eth_link_status);
o.m_Eth_link_statusIsSet = true;
}
if(j.find("power_usage_W") != j.end())
{
j.at("power_usage_W").get_to(o.m_Power_usage_W);
o.m_Power_usage_WIsSet = true;
}
if(j.find("fpga_temp_C") != j.end())
{
j.at("fpga_temp_C").get_to(o.m_Fpga_temp_C);
o.m_Fpga_temp_CIsSet = true;
}
if(j.find("hbm_temp_C") != j.end())
{
j.at("hbm_temp_C").get_to(o.m_Hbm_temp_C);
o.m_Hbm_temp_CIsSet = true;
}
j.at("pci_dev_id").get_to(o.m_Pci_dev_id);
j.at("serial_number").get_to(o.m_Serial_number);
j.at("base_mac_addr").get_to(o.m_Base_mac_addr);
j.at("eth_link_count").get_to(o.m_Eth_link_count);
j.at("eth_link_status").get_to(o.m_Eth_link_status);
j.at("power_usage_W").get_to(o.m_Power_usage_W);
j.at("fpga_temp_C").get_to(o.m_Fpga_temp_C);
j.at("hbm_temp_C").get_to(o.m_Hbm_temp_C);
j.at("packets_udp").get_to(o.m_Packets_udp);
j.at("packets_sls").get_to(o.m_Packets_sls);
}
std::string Fpga_status_inner::getPciDevId() const
{
return m_Pci_dev_id;
}
void Fpga_status_inner::setPciDevId(std::string const& value)
{
m_Pci_dev_id = value;
}
std::string Fpga_status_inner::getSerialNumber() const
{
return m_Serial_number;
}
void Fpga_status_inner::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
}
std::string Fpga_status_inner::getBaseMacAddr() const
{
return m_Base_mac_addr;
}
void Fpga_status_inner::setBaseMacAddr(std::string const& value)
{
m_Base_mac_addr = value;
}
int64_t Fpga_status_inner::getEthLinkCount() const
{
return m_Eth_link_count;
@@ -138,15 +162,6 @@ int64_t Fpga_status_inner::getEthLinkCount() const
void Fpga_status_inner::setEthLinkCount(int64_t const value)
{
m_Eth_link_count = value;
m_Eth_link_countIsSet = true;
}
bool Fpga_status_inner::ethLinkCountIsSet() const
{
return m_Eth_link_countIsSet;
}
void Fpga_status_inner::unsetEth_link_count()
{
m_Eth_link_countIsSet = false;
}
int64_t Fpga_status_inner::getEthLinkStatus() const
{
@@ -155,15 +170,6 @@ int64_t Fpga_status_inner::getEthLinkStatus() const
void Fpga_status_inner::setEthLinkStatus(int64_t const value)
{
m_Eth_link_status = value;
m_Eth_link_statusIsSet = true;
}
bool Fpga_status_inner::ethLinkStatusIsSet() const
{
return m_Eth_link_statusIsSet;
}
void Fpga_status_inner::unsetEth_link_status()
{
m_Eth_link_statusIsSet = false;
}
float Fpga_status_inner::getPowerUsageW() const
{
@@ -172,15 +178,6 @@ float Fpga_status_inner::getPowerUsageW() const
void Fpga_status_inner::setPowerUsageW(float const value)
{
m_Power_usage_W = value;
m_Power_usage_WIsSet = true;
}
bool Fpga_status_inner::powerUsageWIsSet() const
{
return m_Power_usage_WIsSet;
}
void Fpga_status_inner::unsetPower_usage_W()
{
m_Power_usage_WIsSet = false;
}
float Fpga_status_inner::getFpgaTempC() const
{
@@ -189,15 +186,6 @@ float Fpga_status_inner::getFpgaTempC() const
void Fpga_status_inner::setFpgaTempC(float const value)
{
m_Fpga_temp_C = value;
m_Fpga_temp_CIsSet = true;
}
bool Fpga_status_inner::fpgaTempCIsSet() const
{
return m_Fpga_temp_CIsSet;
}
void Fpga_status_inner::unsetFpga_temp_C()
{
m_Fpga_temp_CIsSet = false;
}
float Fpga_status_inner::getHbmTempC() const
{
@@ -206,15 +194,22 @@ float Fpga_status_inner::getHbmTempC() const
void Fpga_status_inner::setHbmTempC(float const value)
{
m_Hbm_temp_C = value;
m_Hbm_temp_CIsSet = true;
}
bool Fpga_status_inner::hbmTempCIsSet() const
int64_t Fpga_status_inner::getPacketsUdp() const
{
return m_Hbm_temp_CIsSet;
return m_Packets_udp;
}
void Fpga_status_inner::unsetHbm_temp_C()
void Fpga_status_inner::setPacketsUdp(int64_t const value)
{
m_Hbm_temp_CIsSet = false;
m_Packets_udp = value;
}
int64_t Fpga_status_inner::getPacketsSls() const
{
return m_Packets_sls;
}
void Fpga_status_inner::setPacketsSls(int64_t const value)
{
m_Packets_sls = value;
}

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,6 +19,7 @@
#define Fpga_status_inner_H_
#include <string>
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -57,55 +58,80 @@ public:
/////////////////////////////////////////////
/// Fpga_status_inner members
/// <summary>
///
/// </summary>
std::string getPciDevId() const;
void setPciDevId(std::string const& value);
/// <summary>
///
/// </summary>
std::string getSerialNumber() const;
void setSerialNumber(std::string const& value);
/// <summary>
///
/// </summary>
std::string getBaseMacAddr() const;
void setBaseMacAddr(std::string const& value);
/// <summary>
///
/// </summary>
int64_t getEthLinkCount() const;
void setEthLinkCount(int64_t const value);
bool ethLinkCountIsSet() const;
void unsetEth_link_count();
/// <summary>
///
/// </summary>
int64_t getEthLinkStatus() const;
void setEthLinkStatus(int64_t const value);
bool ethLinkStatusIsSet() const;
void unsetEth_link_status();
/// <summary>
///
/// </summary>
float getPowerUsageW() const;
void setPowerUsageW(float const value);
bool powerUsageWIsSet() const;
void unsetPower_usage_W();
/// <summary>
///
/// </summary>
float getFpgaTempC() const;
void setFpgaTempC(float const value);
bool fpgaTempCIsSet() const;
void unsetFpga_temp_C();
/// <summary>
///
/// </summary>
float getHbmTempC() const;
void setHbmTempC(float const value);
bool hbmTempCIsSet() const;
void unsetHbm_temp_C();
/// <summary>
///
/// </summary>
int64_t getPacketsUdp() const;
void setPacketsUdp(int64_t const value);
/// <summary>
///
/// </summary>
int64_t getPacketsSls() const;
void setPacketsSls(int64_t const value);
friend void to_json(nlohmann::json& j, const Fpga_status_inner& o);
friend void from_json(const nlohmann::json& j, Fpga_status_inner& o);
protected:
std::string m_Pci_dev_id;
std::string m_Serial_number;
std::string m_Base_mac_addr;
int64_t m_Eth_link_count;
bool m_Eth_link_countIsSet;
int64_t m_Eth_link_status;
bool m_Eth_link_statusIsSet;
float m_Power_usage_W;
bool m_Power_usage_WIsSet;
float m_Fpga_temp_C;
bool m_Fpga_temp_CIsSet;
float m_Hbm_temp_C;
bool m_Hbm_temp_CIsSet;
int64_t m_Packets_udp;
int64_t m_Packets_sls;
};

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@
* Jungfraujoch
* Jungfraujoch Broker Web API
*
* The version of the OpenAPI document: 1.0.0-rc.13
* The version of the OpenAPI document: 1.0.0-rc.14
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Jungfraujoch
description: Jungfraujoch Broker Web API
version: 1.0.0-rc.13
version: 1.0.0-rc.14
contact:
email: filip.leonarski@psi.ch
components:
@@ -357,7 +357,7 @@ components:
- pedestal_g1_frames
- pedestal_g2_frames
- pedestal_g0_rms_limit
- pedestal_window_size
- pedestal_min_image_count
properties:
frame_time_us:
type: integer
@@ -405,12 +405,12 @@ components:
default: 100
minimum: 0
description: Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
pedestal_window_size:
pedestal_min_image_count:
type: integer
format: int64
default: 128
minimum: 32
description: Running average window size for pedestal calculations
description: Minimum number of collected images for pedestal to consider it viable
storage_cell_delay_ns:
type: integer
format: int64
@@ -654,7 +654,24 @@ components:
type: array
items:
type: object
required:
- pci_dev_id
- serial_number
- base_mac_addr
- eth_link_status
- eth_link_count
- power_usage_W
- fpga_temp_C
- hbm_temp_C
- packets_sls
- packets_udp
properties:
pci_dev_id:
type: string
serial_number:
type: string
base_mac_addr:
type: string
eth_link_count:
type: integer
format: int64
@@ -670,6 +687,12 @@ components:
hbm_temp_C:
type: number
format: float
packets_udp:
type: integer
format: int64
packets_sls:
type: integer
format: int64
broker_status:
type: object
required:
@@ -2027,17 +2050,6 @@ paths:
schema:
type: string
description: Exception error
/plot/indexing_rate_per_file:
get:
summary: Generate indexing rate per file
description: Indexing rate per each of data files; useful for example for time resolved data
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
/plot/azim_int:
get:
summary: Generate radial integration profile
@@ -2049,17 +2061,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/plots'
/plot/azim_int_per_file:
get:
summary: Generate radial integration profiles per file
description: Radial integration plots for both the whole dataset and per file; useful for time-resolved measurements
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
/statistics/data_collection:
get:
summary: Get data collection statistics
@@ -2073,7 +2074,6 @@ paths:
$ref: '#/components/schemas/measurement_statistics'
"404":
description: No data collection performed so far
/statistics/calibration:
get:
summary: Get calibration statistics

View File

@@ -60,8 +60,9 @@ int main (int argc, char **argv) {
nlohmann::json input = nlohmann::json::parse(file);
settings = input;
settings.validate();
logger.Info("JSON configuration file read properly");
} catch (const std::exception &e) {
logger.Error("Error reading configuration file: " + std::string(e.what()));
logger.Error("Error reading JSON configuration file: " + std::string(e.what()));
exit(EXIT_FAILURE);
}

File diff suppressed because one or more lines are too long

View File

@@ -35,4 +35,7 @@
#define MASK_PEDESTAL_G0_RMS_LIMIT (1U<<4)
#define PEDESTAL_MIN_IMAGE_COUNT 128
#define PEDESTAL_WRONG 16384
#endif //DEFINITIONS_H

View File

@@ -162,12 +162,12 @@ float DetectorSettings::GetPedestalG0RMSLimit() const {
return pedestal_g0_rms_limit;
}
uint32_t DetectorSettings::GetPedestalWindowSize() const {
return pedestal_window_size;
uint32_t DetectorSettings::GetPedestalMinImageCount() const {
return pedestal_min_image_count;
}
DetectorSettings &DetectorSettings::PedestalWindowSize(uint32_t input) {
DetectorSettings &DetectorSettings::PedestalMinImageCount(uint32_t input) {
check_min("Pedestal window size", input, 32);
pedestal_window_size = input;
pedestal_min_image_count = input;
return *this;
}

View File

@@ -25,7 +25,7 @@ class DetectorSettings {
std::chrono::microseconds frame_time = std::chrono::microseconds{500};
std::optional<std::chrono::microseconds> count_time;
float pedestal_g0_rms_limit = UINT16_MAX;
int64_t pedestal_window_size = PEDESTAL_WINDOW_SIZE;
int64_t pedestal_min_image_count = PEDESTAL_MIN_IMAGE_COUNT;
public:
DetectorSettings& InternalGeneratorEnable(bool input);
DetectorSettings& InternalGeneratorImages(int64_t input);
@@ -44,7 +44,7 @@ public:
DetectorSettings& FrameTime(const std::chrono::microseconds& input,
const std::optional<std::chrono::microseconds> &count_time);
DetectorSettings& PedestalG0RMSLimit(float value);
DetectorSettings& PedestalWindowSize(uint32_t input);
DetectorSettings& PedestalMinImageCount(uint32_t input);
[[nodiscard]] bool IsInternalGeneratorEnable() const;
[[nodiscard]] int64_t GetInternalGeneratorImages() const;
@@ -60,7 +60,7 @@ public:
[[nodiscard]] std::chrono::microseconds GetFrameTime() const;
[[nodiscard]] std::optional<std::chrono::microseconds> GetCountTime() const;
[[nodiscard]] float GetPedestalG0RMSLimit() const;
[[nodiscard]] uint32_t GetPedestalWindowSize() const;
[[nodiscard]] uint32_t GetPedestalMinImageCount() const;
};

View File

@@ -339,15 +339,6 @@ std::string DiffractionExperiment::GetFilePrefix() const {
return dataset.GetFilePrefix();
}
int64_t DiffractionExperiment::GetTimePointNumber() const {
if ((GetNumTriggers() < 5)
|| (GetFrameNumPerTrigger() / GetSummation() > 250)
|| (GetFrameNumPerTrigger() / GetSummation() < 1)) // these are heuristic parameters
return 1;
else
return GetFrameNumPerTrigger() / GetSummation();
}
CompressionAlgorithm DiffractionExperiment::GetCompressionAlgorithm() const {
return dataset.GetCompressionAlgorithm();
}
@@ -1139,6 +1130,6 @@ float DiffractionExperiment::GetPedestalG0RMSLimit() const {
return detector_settings.GetPedestalG0RMSLimit();
}
uint32_t DiffractionExperiment::GetPedestalWindowSize() const {
return detector_settings.GetPedestalWindowSize();
uint32_t DiffractionExperiment::GetPedestalMinImageCount() const {
return detector_settings.GetPedestalMinImageCount();
}

View File

@@ -280,7 +280,6 @@ public:
Coord GetScatteringVector() const;
std::string GetFilePrefix() const;
int64_t GetTimePointNumber() const;
CompressionAlgorithm GetCompressionAlgorithm() const;
int64_t GetNumTriggers() const;
@@ -318,7 +317,7 @@ public:
void Conversion();
float GetPedestalG0RMSLimit() const;
uint32_t GetPedestalWindowSize() const;
uint32_t GetPedestalMinImageCount() const;
};
#endif //DIFFRACTIONEXPERIMENT_H

View File

@@ -12,8 +12,8 @@ ImageFormatSettings::ImageFormatSettings() {
jungfrau_conv_to_photon_counts = true;
auto_summation = true;
geometry_transformation = true;
mask_chip_edges = false;
mask_module_edges = false;
mask_chip_edges = true;
mask_module_edges = true;
}
ImageFormatSettings &ImageFormatSettings::GeometryTransformed(bool input) {

View File

@@ -8,8 +8,7 @@
#include <string>
enum class PlotType {
BkgEstimate, RadInt, RadIntPerTimePoint, SpotCount, SpotCountInRings,
IndexingRate, IndexingRatePerTimePoint,
BkgEstimate, AzInt, SpotCount, IndexingRate,
ErrorPixels, ImageCollectionEfficiency, ReceiverDelay, ReceiverFreeSendBuf, StrongPixels,
ROISum, ROIMaxCount, ROIPixels
};

View File

@@ -12,13 +12,17 @@
#include "Plot.h"
#include "JFJochException.h"
#include <iostream>
#include <memory>
template <class T> class StatusVector {
mutable std::mutex m;
std::vector<T> content;
std::vector<uint8_t> present;
float mean = NAN;
size_t count = 0;
double sum = 0;
MultiLinePlot GeneratePlot(const std::vector<float> &status, int32_t bin_size) const {
MultiLinePlot ret(1);
if (status.size() == 1) {
@@ -38,6 +42,12 @@ template <class T> class StatusVector {
return ret;
}
public:
void Clear() {
std::unique_lock<std::mutex> ul(m);
content.clear();
present.clear();
}
void AddElement(uint32_t id, std::optional<T> val) {
if (val.has_value())
AddElement(id, val.value());
@@ -51,6 +61,10 @@ public:
}
content[id] = val;
present[id] = 1;
sum += val;
count += 1;
mean = sum / count;
}
[[nodiscard]] std::vector<T> ExportArray(T def_value) const {
@@ -64,18 +78,7 @@ public:
}
[[nodiscard]] float Mean() const {
std::unique_lock<std::mutex> ul(m);
size_t count = 0;
double sum = 0;
for (int i = 0; i < content.size(); i++) {
sum += present[i] * content[i];
count += present[i];
}
if (count > 0)
return static_cast<float>(sum / count);
else
return NAN;
return mean;
}
[[nodiscard]] std::vector<float> GetMeanPerBin(int32_t bin_size) const {
@@ -144,5 +147,37 @@ public:
}
};
template <class T> class StatusMultiVector {
std::mutex m;
std::map<std::string, std::unique_ptr<StatusVector<T>>> status;
public:
void Clear() {
std::unique_lock ul(m);
status.clear();
}
void AddElement(const std::string& s, uint32_t id, T val) {
std::unique_lock ul(m);
if (!status.contains(s))
status[s] = std::make_unique<StatusVector<T>>();
status[s]->AddElement(id, val);
}
void AddElement(const std::string& s, uint32_t id, std::optional<T> val) {
// no need to lock, as AddElement(string, u32, T) has lock already
if (val.has_value())
AddElement(s, id, val.value());
}
[[nodiscard]] MultiLinePlot GetMeanPlot(int64_t bin_size) const {
MultiLinePlot ret;
for (const auto &[key, value]: status) {
MultiLinePlot tmp = value->GetMeanPlot(bin_size);
tmp.at(0).title = key;
ret.emplace_back(tmp.at(0));
}
return ret;
}
};
#endif //JUNGFRAUJOCH_STATUSVECTOR_H

View File

@@ -97,7 +97,7 @@
"pedestal_g1_frames": 300,
"pedestal_g2_frames": 300,
"pedestal_g0_rms_limit": 100,
"pedestal_window_size": 128,
"pedestal_min_image_count": 128,
"storage_cell_count": 1,
"storage_cell_delay_ns": 2100,
"fixed_gain_g1": false,

View File

@@ -54,7 +54,7 @@
"pedestal_g1_frames": 0,
"pedestal_g2_frames": 0,
"pedestal_g0_rms_limit": 100,
"pedestal_window_size": 128,
"pedestal_min_image_count": 128,
"storage_cell_count": 1,
"storage_cell_delay_ns": 2100,
"fixed_gain_g1": false,

View File

@@ -23,12 +23,6 @@ IF(VIVADO_HLS AND VIVADO)
COMMAND ${CMAKE_COMMAND} -E env FLOW=pcie_100g VIV_PROJECT_PATH=${CMAKE_CURRENT_BINARY_DIR}/vivado/jfjoch_pcie.xpr ${VIVADO} -notrace -mode batch -source ${CMAKE_CURRENT_SOURCE_DIR}/scripts/synth_and_impl.tcl
)
ADD_CUSTOM_TARGET(pcie_100g_anlt DEPENDS hls
COMMAND ${CMAKE_COMMAND} -E env VARIANT=2 SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR} HLS_IP_DIR=${CMAKE_CURRENT_BINARY_DIR}/action/ip/hls bash ${CMAKE_CURRENT_SOURCE_DIR}/scripts/setup_action.sh
COMMAND ${CMAKE_COMMAND} -E env JFJOCH_CMAC_ANLT=1 ${VIVADO} -notrace -mode batch -source ${CMAKE_CURRENT_SOURCE_DIR}/scripts/build_pcie_design.tcl
COMMAND ${CMAKE_COMMAND} -E env FLOW=pcie_100g_anlt VIV_PROJECT_PATH=${CMAKE_CURRENT_BINARY_DIR}/vivado/jfjoch_pcie.xpr ${VIVADO} -notrace -mode batch -source ${CMAKE_CURRENT_SOURCE_DIR}/scripts/synth_and_impl.tcl
)
ADD_CUSTOM_TARGET(pcie_8x10g DEPENDS hls
COMMAND ${CMAKE_COMMAND} -E env VARIANT=1 SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR} HLS_IP_DIR=${CMAKE_CURRENT_BINARY_DIR}/action/ip/hls bash ${CMAKE_CURRENT_SOURCE_DIR}/scripts/setup_action.sh
COMMAND ${VIVADO} -notrace -mode batch -source ${CMAKE_CURRENT_SOURCE_DIR}/scripts/build_pcie_design_8x10g.tcl

View File

@@ -1,15 +1,11 @@
# FPGA Network
The U55C card is equipped with two network connectors - QSFP0 is the upper port and QSFP1 is lower port (when PCIe connector is on the bottom).
The card FPGA design is offered in three variants `100g`, `100g_anlt` and `8x10g`. These have different behavior regarding the network:
The card FPGA design is offered in two variants `100g` and `8x10g`. These have different behavior regarding the network:
`100g` this variant operates both ports in 100 Gbit/s mode and should be used when connecting detector via a **switch**.
Even both QSFP ports are enabled in FPGA hardware, software only supports QSFP0. Using both ports can be enabled for special cases - for example if two networks are used alternatively.
To be noted: using both ports has no effect on performance - as both ethernet links are merged to single 100 Gbit/s link early in the design.
`100g` this variant operates QSFP0 port in 100 Gbit/s mode and should be used when connecting detector via a **switch**.
QSFP28 transceivers are necessary.
`100g_anlt` this variant is the same as above, but includes ethernet auto-negotiation. It is experimental at the moment.
`8x10g` this variant operates both QSFP ports at 4x10 Gbit/s. QSFP+ (40 Gbit/s) transceivers and MTO/MTP harness cables
are necessary. It is designed for **detector directly connected** to the Jungfraujoch server, without switch.
@@ -39,34 +35,5 @@ The card won't respond to broadcast ICMP pings.
Each link can be put in `direct` mode. In this case destination Ethernet MAC and IPv4 addresses are not enforced for incoming UDP packets.
This settings should be used for connecting detector modules directly to the FPGA card, so any detector module can be connected to any
10 Gbit/s link on the same card. Currently `direct` mode is turned OFF for `100g`/`100g_anlt` designs and ON for `8x10g` design.
This can be manually adjusted for each link.
## Network tools
Network can be setup with `jfjoch_pcie_net_cfg` tool, usage:
```
jfjoch_pcie_net_cfg <device name>
Read configuration for all network interface of a device
jfjoch_pcie_net_cfg <device name> <if number>|fgen
Read configuration for a particular network interface / internal frame generator"
jfjoch_pcie_net_cfg <device name> <if number>|fgen ipv4 <IPv4 address>
Set IPv4 address for a particular network interface / internal frame generator
jfjoch_pcie_net_cfg <device name> <if number>|fgen direct 0|1
Set direct mode for a particular network interface / internal frame generator
jfjoch_pcie_net_cfg <device name> <if number>|fgen clear
Clear Ethernet counter for a particular network interface / internal frame generator
```
UDP/detector packet counters can be reset with the following tool:
```
jfjoch_pcie_clear_net_counters <device name>
```
Data source can be selected with `jfjoch_pcie_data_src` tool:
```
jfjoch_pcie_data_src <device name>
Read data source of a device
jfjoch_pcie_data_src <device name> net0|net1|fgen|none
Select data source
```
10 Gbit/s link on the same card. Currently `direct` mode is turned OFF for `100g` design and ON for `8x10g` design.
This can be manually adjusted for each link.

Some files were not shown because too many files have changed in this diff Show More