Files
Jungfraujoch/broker/gen/model/Powder_calibration_output.cpp
T
leonarski_fandClaude Opus 5 bd6e933f04 api: name the calibration schemas powder_, not calibration_
"Calibration" already means something else in this broker: the JUNGFRAU pedestal
and gain measurement, which owns /statistics/calibration, calibration_statistics
and JFJochState::Calibration. Four schemas called calibration_* would have sat
beside it meaning a completely different procedure, and the confusion is cheapest
to remove now, before an endpoint returns them.

calibration_output, calibration_quality, calibration_fit_sigma and
calibration_spot_check become powder_calibration_output,
powder_calibration_quality, powder_calibration_fit_sigma and
powder_calibration_spot_check. All four, not only the outer one - the collision
is in the word, and half a rename would read as though the inner three belonged
to the other kind of calibration.

Rename only. Every client regenerated from the spec: the C++ server model, the
TypeScript frontend client, redoc-static.html, and the python client, which is
gitignored but was checked to still decode the file rugnux writes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NfuDvf5ipV3Hi8TiCUKD27
2026-08-31 18:58:24 +02:00

152 lines
5.1 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.166
* 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 "Powder_calibration_output.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Powder_calibration_output::Powder_calibration_output()
{
m_CalibrationIsSet = false;
m_Jfjoch_version = "";
m_Jfjoch_versionIsSet = false;
}
void Powder_calibration_output::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Powder_calibration_output::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Powder_calibration_output::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Powder_calibration_output" : pathPrefix;
if (!m_Dataset_settings.validate(msg, _pathPrefix + ".datasetSettings")) {
msg << _pathPrefix << ": Dataset_settings is invalid;";
success = false;
}
return success;
}
bool Powder_calibration_output::operator==(const Powder_calibration_output& rhs) const
{
return
(getDatasetSettings() == rhs.getDatasetSettings())
&&
((!calibrationIsSet() && !rhs.calibrationIsSet()) || (calibrationIsSet() && rhs.calibrationIsSet() && getCalibration() == rhs.getCalibration())) &&
((!jfjochVersionIsSet() && !rhs.jfjochVersionIsSet()) || (jfjochVersionIsSet() && rhs.jfjochVersionIsSet() && getJfjochVersion() == rhs.getJfjochVersion()))
;
}
bool Powder_calibration_output::operator!=(const Powder_calibration_output& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Powder_calibration_output& o)
{
j = nlohmann::json::object();
j["dataset_settings"] = o.m_Dataset_settings;
if(o.calibrationIsSet())
j["calibration"] = o.m_Calibration;
if(o.jfjochVersionIsSet())
j["jfjoch_version"] = o.m_Jfjoch_version;
}
void from_json(const nlohmann::json& j, Powder_calibration_output& o)
{
j.at("dataset_settings").get_to(o.m_Dataset_settings);
if(j.find("calibration") != j.end())
{
j.at("calibration").get_to(o.m_Calibration);
o.m_CalibrationIsSet = true;
}
if(j.find("jfjoch_version") != j.end())
{
j.at("jfjoch_version").get_to(o.m_Jfjoch_version);
o.m_Jfjoch_versionIsSet = true;
}
}
org::openapitools::server::model::Dataset_settings Powder_calibration_output::getDatasetSettings() const
{
return m_Dataset_settings;
}
void Powder_calibration_output::setDatasetSettings(org::openapitools::server::model::Dataset_settings const& value)
{
m_Dataset_settings = value;
}
org::openapitools::server::model::Powder_calibration_quality Powder_calibration_output::getCalibration() const
{
return m_Calibration;
}
void Powder_calibration_output::setCalibration(org::openapitools::server::model::Powder_calibration_quality const& value)
{
m_Calibration = value;
m_CalibrationIsSet = true;
}
bool Powder_calibration_output::calibrationIsSet() const
{
return m_CalibrationIsSet;
}
void Powder_calibration_output::unsetCalibration()
{
m_CalibrationIsSet = false;
}
std::string Powder_calibration_output::getJfjochVersion() const
{
return m_Jfjoch_version;
}
void Powder_calibration_output::setJfjochVersion(std::string const& value)
{
m_Jfjoch_version = value;
m_Jfjoch_versionIsSet = true;
}
bool Powder_calibration_output::jfjochVersionIsSet() const
{
return m_Jfjoch_versionIsSet;
}
void Powder_calibration_output::unsetJfjoch_version()
{
m_Jfjoch_versionIsSet = false;
}
} // namespace org::openapitools::server::model