204 lines
6.2 KiB
C++
204 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.94
|
|
* 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 "Calibration_statistics_inner.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Calibration_statistics_inner::Calibration_statistics_inner()
|
|
{
|
|
m_Module_number = 0L;
|
|
m_Storage_cell_number = 0L;
|
|
m_Pedestal_g0_mean = 0.0f;
|
|
m_Pedestal_g1_mean = 0.0f;
|
|
m_Pedestal_g2_mean = 0.0f;
|
|
m_Gain_g0_mean = 0.0f;
|
|
m_Gain_g1_mean = 0.0f;
|
|
m_Gain_g2_mean = 0.0f;
|
|
m_Masked_pixels = 0L;
|
|
|
|
}
|
|
|
|
void Calibration_statistics_inner::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Calibration_statistics_inner::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Calibration_statistics_inner::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Calibration_statistics_inner" : pathPrefix;
|
|
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Calibration_statistics_inner::operator==(const Calibration_statistics_inner& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getModuleNumber() == rhs.getModuleNumber())
|
|
&&
|
|
|
|
(getStorageCellNumber() == rhs.getStorageCellNumber())
|
|
&&
|
|
|
|
(getPedestalG0Mean() == rhs.getPedestalG0Mean())
|
|
&&
|
|
|
|
(getPedestalG1Mean() == rhs.getPedestalG1Mean())
|
|
&&
|
|
|
|
(getPedestalG2Mean() == rhs.getPedestalG2Mean())
|
|
&&
|
|
|
|
(getGainG0Mean() == rhs.getGainG0Mean())
|
|
&&
|
|
|
|
(getGainG1Mean() == rhs.getGainG1Mean())
|
|
&&
|
|
|
|
(getGainG2Mean() == rhs.getGainG2Mean())
|
|
&&
|
|
|
|
(getMaskedPixels() == rhs.getMaskedPixels())
|
|
|
|
|
|
;
|
|
}
|
|
|
|
bool Calibration_statistics_inner::operator!=(const Calibration_statistics_inner& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Calibration_statistics_inner& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["module_number"] = o.m_Module_number;
|
|
j["storage_cell_number"] = o.m_Storage_cell_number;
|
|
j["pedestal_g0_mean"] = o.m_Pedestal_g0_mean;
|
|
j["pedestal_g1_mean"] = o.m_Pedestal_g1_mean;
|
|
j["pedestal_g2_mean"] = o.m_Pedestal_g2_mean;
|
|
j["gain_g0_mean"] = o.m_Gain_g0_mean;
|
|
j["gain_g1_mean"] = o.m_Gain_g1_mean;
|
|
j["gain_g2_mean"] = o.m_Gain_g2_mean;
|
|
j["masked_pixels"] = o.m_Masked_pixels;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Calibration_statistics_inner& o)
|
|
{
|
|
j.at("module_number").get_to(o.m_Module_number);
|
|
j.at("storage_cell_number").get_to(o.m_Storage_cell_number);
|
|
j.at("pedestal_g0_mean").get_to(o.m_Pedestal_g0_mean);
|
|
j.at("pedestal_g1_mean").get_to(o.m_Pedestal_g1_mean);
|
|
j.at("pedestal_g2_mean").get_to(o.m_Pedestal_g2_mean);
|
|
j.at("gain_g0_mean").get_to(o.m_Gain_g0_mean);
|
|
j.at("gain_g1_mean").get_to(o.m_Gain_g1_mean);
|
|
j.at("gain_g2_mean").get_to(o.m_Gain_g2_mean);
|
|
j.at("masked_pixels").get_to(o.m_Masked_pixels);
|
|
|
|
}
|
|
|
|
int64_t Calibration_statistics_inner::getModuleNumber() const
|
|
{
|
|
return m_Module_number;
|
|
}
|
|
void Calibration_statistics_inner::setModuleNumber(int64_t const value)
|
|
{
|
|
m_Module_number = value;
|
|
}
|
|
int64_t Calibration_statistics_inner::getStorageCellNumber() const
|
|
{
|
|
return m_Storage_cell_number;
|
|
}
|
|
void Calibration_statistics_inner::setStorageCellNumber(int64_t const value)
|
|
{
|
|
m_Storage_cell_number = value;
|
|
}
|
|
float Calibration_statistics_inner::getPedestalG0Mean() const
|
|
{
|
|
return m_Pedestal_g0_mean;
|
|
}
|
|
void Calibration_statistics_inner::setPedestalG0Mean(float const value)
|
|
{
|
|
m_Pedestal_g0_mean = value;
|
|
}
|
|
float Calibration_statistics_inner::getPedestalG1Mean() const
|
|
{
|
|
return m_Pedestal_g1_mean;
|
|
}
|
|
void Calibration_statistics_inner::setPedestalG1Mean(float const value)
|
|
{
|
|
m_Pedestal_g1_mean = value;
|
|
}
|
|
float Calibration_statistics_inner::getPedestalG2Mean() const
|
|
{
|
|
return m_Pedestal_g2_mean;
|
|
}
|
|
void Calibration_statistics_inner::setPedestalG2Mean(float const value)
|
|
{
|
|
m_Pedestal_g2_mean = value;
|
|
}
|
|
float Calibration_statistics_inner::getGainG0Mean() const
|
|
{
|
|
return m_Gain_g0_mean;
|
|
}
|
|
void Calibration_statistics_inner::setGainG0Mean(float const value)
|
|
{
|
|
m_Gain_g0_mean = value;
|
|
}
|
|
float Calibration_statistics_inner::getGainG1Mean() const
|
|
{
|
|
return m_Gain_g1_mean;
|
|
}
|
|
void Calibration_statistics_inner::setGainG1Mean(float const value)
|
|
{
|
|
m_Gain_g1_mean = value;
|
|
}
|
|
float Calibration_statistics_inner::getGainG2Mean() const
|
|
{
|
|
return m_Gain_g2_mean;
|
|
}
|
|
void Calibration_statistics_inner::setGainG2Mean(float const value)
|
|
{
|
|
m_Gain_g2_mean = value;
|
|
}
|
|
int64_t Calibration_statistics_inner::getMaskedPixels() const
|
|
{
|
|
return m_Masked_pixels;
|
|
}
|
|
void Calibration_statistics_inner::setMaskedPixels(int64_t const value)
|
|
{
|
|
m_Masked_pixels = value;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|