Build Packages / Create release (push) Successful in 15s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m20s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m33s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 8m40s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 10m17s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 10m43s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 12m57s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 17m41s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Failing after 18m6s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 18m1s
Build Packages / build:viewer:windows-x86_64:cuda (push) Failing after 20m57s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 24m13s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 18m42s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 21m13s
Build Packages / Generate python client (push) Successful in 33s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 20m40s
Build Packages / Build documentation (push) Successful in 1m10s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Failing after 14m6s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m1s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 19m17s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 19m44s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 16m45s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 13m36s
Build Packages / Unit tests (push) Failing after 1h18m4s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5K8jvPPbmCrbqnWkddTuB
207 lines
6.2 KiB
C++
207 lines
6.2 KiB
C++
/**
|
|
* Jungfraujoch
|
|
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.174
|
|
* Contact: filip.leonarski@psi.ch
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
#include "Pixel_mask_statistics.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Pixel_mask_statistics::Pixel_mask_statistics()
|
|
{
|
|
m_User_mask = 0L;
|
|
m_User_maskIsSet = false;
|
|
m_Too_high_pedestal_rms = 0L;
|
|
m_Too_high_pedestal_rmsIsSet = false;
|
|
m_Wrong_gain = 0L;
|
|
m_Wrong_gainIsSet = false;
|
|
|
|
}
|
|
|
|
void Pixel_mask_statistics::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Pixel_mask_statistics::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Pixel_mask_statistics::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Pixel_mask_statistics" : pathPrefix;
|
|
|
|
|
|
if (userMaskIsSet())
|
|
{
|
|
const int64_t& value = m_User_mask;
|
|
const std::string currentValuePath = _pathPrefix + ".userMask";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
if (tooHighPedestalRmsIsSet())
|
|
{
|
|
const int64_t& value = m_Too_high_pedestal_rms;
|
|
const std::string currentValuePath = _pathPrefix + ".tooHighPedestalRms";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
if (wrongGainIsSet())
|
|
{
|
|
const int64_t& value = m_Wrong_gain;
|
|
const std::string currentValuePath = _pathPrefix + ".wrongGain";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Pixel_mask_statistics::operator==(const Pixel_mask_statistics& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
|
|
((!userMaskIsSet() && !rhs.userMaskIsSet()) || (userMaskIsSet() && rhs.userMaskIsSet() && getUserMask() == rhs.getUserMask())) &&
|
|
|
|
|
|
((!tooHighPedestalRmsIsSet() && !rhs.tooHighPedestalRmsIsSet()) || (tooHighPedestalRmsIsSet() && rhs.tooHighPedestalRmsIsSet() && getTooHighPedestalRms() == rhs.getTooHighPedestalRms())) &&
|
|
|
|
|
|
((!wrongGainIsSet() && !rhs.wrongGainIsSet()) || (wrongGainIsSet() && rhs.wrongGainIsSet() && getWrongGain() == rhs.getWrongGain()))
|
|
|
|
;
|
|
}
|
|
|
|
bool Pixel_mask_statistics::operator!=(const Pixel_mask_statistics& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Pixel_mask_statistics& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
if(o.userMaskIsSet())
|
|
j["user_mask"] = o.m_User_mask;
|
|
if(o.tooHighPedestalRmsIsSet())
|
|
j["too_high_pedestal_rms"] = o.m_Too_high_pedestal_rms;
|
|
if(o.wrongGainIsSet())
|
|
j["wrong_gain"] = o.m_Wrong_gain;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Pixel_mask_statistics& o)
|
|
{
|
|
if(j.find("user_mask") != j.end())
|
|
{
|
|
j.at("user_mask").get_to(o.m_User_mask);
|
|
o.m_User_maskIsSet = true;
|
|
}
|
|
if(j.find("too_high_pedestal_rms") != j.end())
|
|
{
|
|
j.at("too_high_pedestal_rms").get_to(o.m_Too_high_pedestal_rms);
|
|
o.m_Too_high_pedestal_rmsIsSet = true;
|
|
}
|
|
if(j.find("wrong_gain") != j.end())
|
|
{
|
|
j.at("wrong_gain").get_to(o.m_Wrong_gain);
|
|
o.m_Wrong_gainIsSet = true;
|
|
}
|
|
|
|
}
|
|
|
|
int64_t Pixel_mask_statistics::getUserMask() const
|
|
{
|
|
return m_User_mask;
|
|
}
|
|
void Pixel_mask_statistics::setUserMask(int64_t const value)
|
|
{
|
|
m_User_mask = value;
|
|
m_User_maskIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::userMaskIsSet() const
|
|
{
|
|
return m_User_maskIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetUser_mask()
|
|
{
|
|
m_User_maskIsSet = false;
|
|
}
|
|
int64_t Pixel_mask_statistics::getTooHighPedestalRms() const
|
|
{
|
|
return m_Too_high_pedestal_rms;
|
|
}
|
|
void Pixel_mask_statistics::setTooHighPedestalRms(int64_t const value)
|
|
{
|
|
m_Too_high_pedestal_rms = value;
|
|
m_Too_high_pedestal_rmsIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::tooHighPedestalRmsIsSet() const
|
|
{
|
|
return m_Too_high_pedestal_rmsIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetToo_high_pedestal_rms()
|
|
{
|
|
m_Too_high_pedestal_rmsIsSet = false;
|
|
}
|
|
int64_t Pixel_mask_statistics::getWrongGain() const
|
|
{
|
|
return m_Wrong_gain;
|
|
}
|
|
void Pixel_mask_statistics::setWrongGain(int64_t const value)
|
|
{
|
|
m_Wrong_gain = value;
|
|
m_Wrong_gainIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::wrongGainIsSet() const
|
|
{
|
|
return m_Wrong_gainIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetWrong_gain()
|
|
{
|
|
m_Wrong_gainIsSet = false;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|