Files
Jungfraujoch/broker/gen/model/Dataset_settings.cpp
2025-07-15 09:55:19 +02:00

1267 lines
36 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.
*
* The version of the OpenAPI document: 1.0.0-rc.64
* 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 "Dataset_settings.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Dataset_settings::Dataset_settings()
{
m_Images_per_trigger = 1L;
m_Images_per_triggerIsSet = false;
m_Ntrigger = 1L;
m_NtriggerIsSet = false;
m_Image_time_us = 0L;
m_Image_time_usIsSet = false;
m_Beam_x_pxl = 0.0f;
m_Beam_y_pxl = 0.0f;
m_Detector_distance_mm = 0.0f;
m_Incident_energy_keV = 0.0f;
m_File_prefix = "";
m_File_prefixIsSet = false;
m_Images_per_file = 1000L;
m_Images_per_fileIsSet = false;
m_Space_group_number = 0L;
m_Space_group_numberIsSet = false;
m_Sample_name = "";
m_Sample_nameIsSet = false;
m_Compression = "bslz4";
m_CompressionIsSet = false;
m_Total_flux = 0.0f;
m_Total_fluxIsSet = false;
m_Transmission = 0.0f;
m_TransmissionIsSet = false;
m_GoniometerIsSet = false;
m_Grid_scanIsSet = false;
m_Header_appendixIsSet = false;
m_Image_appendixIsSet = false;
m_Data_reduction_factor_serialmx = 1.0f;
m_Data_reduction_factor_serialmxIsSet = false;
m_Pixel_value_low_threshold = 0L;
m_Pixel_value_low_thresholdIsSet = false;
m_Run_number = 0L;
m_Run_numberIsSet = false;
m_Run_name = "";
m_Run_nameIsSet = false;
m_Experiment_group = "";
m_Experiment_groupIsSet = false;
m_Poisson_compression = 0L;
m_Poisson_compressionIsSet = false;
m_Write_nxmx_hdf5_master = true;
m_Write_nxmx_hdf5_masterIsSet = false;
m_Save_calibration = false;
m_Save_calibrationIsSet = false;
m_Polarization_factor = 0.0f;
m_Polarization_factorIsSet = false;
m_Ring_current_mA = 0.0f;
m_Ring_current_mAIsSet = false;
m_Sample_temperature_K = 0.0f;
m_Sample_temperature_KIsSet = false;
m_Poni_rot1_rad = 0.0f;
m_Poni_rot1_radIsSet = false;
m_Poni_rot2_rad = 0.0f;
m_Poni_rot2_radIsSet = false;
m_Poni_rot3_rad = 0.0f;
m_Poni_rot3_radIsSet = false;
m_Unit_cellIsSet = false;
}
void Dataset_settings::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Dataset_settings::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Dataset_settings" : pathPrefix;
if (imagesPerTriggerIsSet())
{
const int64_t& value = m_Images_per_trigger;
const std::string currentValuePath = _pathPrefix + ".imagesPerTrigger";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
if (ntriggerIsSet())
{
const int64_t& value = m_Ntrigger;
const std::string currentValuePath = _pathPrefix + ".ntrigger";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
if (imageTimeUsIsSet())
{
const int64_t& value = m_Image_time_us;
const std::string currentValuePath = _pathPrefix + ".imageTimeUs";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
/* Detector_distance_mm */ {
const float& value = m_Detector_distance_mm;
const std::string currentValuePath = _pathPrefix + ".detectorDistanceMm";
if (value < static_cast<float>(0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
/* Incident_energy_keV */ {
const float& value = m_Incident_energy_keV;
const std::string currentValuePath = _pathPrefix + ".incidentEnergyKeV";
if (value < static_cast<float>(0.001))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.001;";
}
if (value > static_cast<float>(500.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 500.0;";
}
}
if (imagesPerFileIsSet())
{
const int64_t& value = m_Images_per_file;
const std::string currentValuePath = _pathPrefix + ".imagesPerFile";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (spaceGroupNumberIsSet())
{
const int64_t& value = m_Space_group_number;
const std::string currentValuePath = _pathPrefix + ".spaceGroupNumber";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
if (value > 194ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 194;";
}
}
if (transmissionIsSet())
{
const float& value = m_Transmission;
const std::string currentValuePath = _pathPrefix + ".transmission";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
if (dataReductionFactorSerialmxIsSet())
{
const float& value = m_Data_reduction_factor_serialmx;
const std::string currentValuePath = _pathPrefix + ".dataReductionFactorSerialmx";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
if (pixelValueLowThresholdIsSet())
{
const int64_t& value = m_Pixel_value_low_threshold;
const std::string currentValuePath = _pathPrefix + ".pixelValueLowThreshold";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (runNumberIsSet())
{
const int64_t& value = m_Run_number;
const std::string currentValuePath = _pathPrefix + ".runNumber";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (poissonCompressionIsSet())
{
const int64_t& value = m_Poisson_compression;
const std::string currentValuePath = _pathPrefix + ".poissonCompression";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
if (value > 16ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 16;";
}
}
if (polarizationFactorIsSet())
{
const float& value = m_Polarization_factor;
const std::string currentValuePath = _pathPrefix + ".polarizationFactor";
if (value < static_cast<float>(-1.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -1.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
if (ringCurrentMAIsSet())
{
const float& value = m_Ring_current_mA;
const std::string currentValuePath = _pathPrefix + ".ringCurrentMA";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (sampleTemperatureKIsSet())
{
const float& value = m_Sample_temperature_K;
const std::string currentValuePath = _pathPrefix + ".sampleTemperatureK";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (poniRot1RadIsSet())
{
const float& value = m_Poni_rot1_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot1Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot2RadIsSet())
{
const float& value = m_Poni_rot2_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot2Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot3RadIsSet())
{
const float& value = m_Poni_rot3_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot3Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
return success;
}
bool Dataset_settings::operator==(const Dataset_settings& rhs) const
{
return
((!imagesPerTriggerIsSet() && !rhs.imagesPerTriggerIsSet()) || (imagesPerTriggerIsSet() && rhs.imagesPerTriggerIsSet() && getImagesPerTrigger() == rhs.getImagesPerTrigger())) &&
((!ntriggerIsSet() && !rhs.ntriggerIsSet()) || (ntriggerIsSet() && rhs.ntriggerIsSet() && getNtrigger() == rhs.getNtrigger())) &&
((!imageTimeUsIsSet() && !rhs.imageTimeUsIsSet()) || (imageTimeUsIsSet() && rhs.imageTimeUsIsSet() && getImageTimeUs() == rhs.getImageTimeUs())) &&
(getBeamXPxl() == rhs.getBeamXPxl())
&&
(getBeamYPxl() == rhs.getBeamYPxl())
&&
(getDetectorDistanceMm() == rhs.getDetectorDistanceMm())
&&
(getIncidentEnergyKeV() == rhs.getIncidentEnergyKeV())
&&
((!filePrefixIsSet() && !rhs.filePrefixIsSet()) || (filePrefixIsSet() && rhs.filePrefixIsSet() && getFilePrefix() == rhs.getFilePrefix())) &&
((!imagesPerFileIsSet() && !rhs.imagesPerFileIsSet()) || (imagesPerFileIsSet() && rhs.imagesPerFileIsSet() && getImagesPerFile() == rhs.getImagesPerFile())) &&
((!spaceGroupNumberIsSet() && !rhs.spaceGroupNumberIsSet()) || (spaceGroupNumberIsSet() && rhs.spaceGroupNumberIsSet() && getSpaceGroupNumber() == rhs.getSpaceGroupNumber())) &&
((!sampleNameIsSet() && !rhs.sampleNameIsSet()) || (sampleNameIsSet() && rhs.sampleNameIsSet() && getSampleName() == rhs.getSampleName())) &&
((!compressionIsSet() && !rhs.compressionIsSet()) || (compressionIsSet() && rhs.compressionIsSet() && getCompression() == rhs.getCompression())) &&
((!totalFluxIsSet() && !rhs.totalFluxIsSet()) || (totalFluxIsSet() && rhs.totalFluxIsSet() && getTotalFlux() == rhs.getTotalFlux())) &&
((!transmissionIsSet() && !rhs.transmissionIsSet()) || (transmissionIsSet() && rhs.transmissionIsSet() && getTransmission() == rhs.getTransmission())) &&
((!goniometerIsSet() && !rhs.goniometerIsSet()) || (goniometerIsSet() && rhs.goniometerIsSet() && getGoniometer() == rhs.getGoniometer())) &&
((!gridScanIsSet() && !rhs.gridScanIsSet()) || (gridScanIsSet() && rhs.gridScanIsSet() && getGridScan() == rhs.getGridScan())) &&
((!headerAppendixIsSet() && !rhs.headerAppendixIsSet()) || (headerAppendixIsSet() && rhs.headerAppendixIsSet() && getHeaderAppendix() == rhs.getHeaderAppendix())) &&
((!imageAppendixIsSet() && !rhs.imageAppendixIsSet()) || (imageAppendixIsSet() && rhs.imageAppendixIsSet() && getImageAppendix() == rhs.getImageAppendix())) &&
((!dataReductionFactorSerialmxIsSet() && !rhs.dataReductionFactorSerialmxIsSet()) || (dataReductionFactorSerialmxIsSet() && rhs.dataReductionFactorSerialmxIsSet() && getDataReductionFactorSerialmx() == rhs.getDataReductionFactorSerialmx())) &&
((!pixelValueLowThresholdIsSet() && !rhs.pixelValueLowThresholdIsSet()) || (pixelValueLowThresholdIsSet() && rhs.pixelValueLowThresholdIsSet() && getPixelValueLowThreshold() == rhs.getPixelValueLowThreshold())) &&
((!runNumberIsSet() && !rhs.runNumberIsSet()) || (runNumberIsSet() && rhs.runNumberIsSet() && getRunNumber() == rhs.getRunNumber())) &&
((!runNameIsSet() && !rhs.runNameIsSet()) || (runNameIsSet() && rhs.runNameIsSet() && getRunName() == rhs.getRunName())) &&
((!experimentGroupIsSet() && !rhs.experimentGroupIsSet()) || (experimentGroupIsSet() && rhs.experimentGroupIsSet() && getExperimentGroup() == rhs.getExperimentGroup())) &&
((!poissonCompressionIsSet() && !rhs.poissonCompressionIsSet()) || (poissonCompressionIsSet() && rhs.poissonCompressionIsSet() && getPoissonCompression() == rhs.getPoissonCompression())) &&
((!writeNxmxHdf5MasterIsSet() && !rhs.writeNxmxHdf5MasterIsSet()) || (writeNxmxHdf5MasterIsSet() && rhs.writeNxmxHdf5MasterIsSet() && isWriteNxmxHdf5Master() == rhs.isWriteNxmxHdf5Master())) &&
((!saveCalibrationIsSet() && !rhs.saveCalibrationIsSet()) || (saveCalibrationIsSet() && rhs.saveCalibrationIsSet() && isSaveCalibration() == rhs.isSaveCalibration())) &&
((!polarizationFactorIsSet() && !rhs.polarizationFactorIsSet()) || (polarizationFactorIsSet() && rhs.polarizationFactorIsSet() && getPolarizationFactor() == rhs.getPolarizationFactor())) &&
((!ringCurrentMAIsSet() && !rhs.ringCurrentMAIsSet()) || (ringCurrentMAIsSet() && rhs.ringCurrentMAIsSet() && getRingCurrentMA() == rhs.getRingCurrentMA())) &&
((!sampleTemperatureKIsSet() && !rhs.sampleTemperatureKIsSet()) || (sampleTemperatureKIsSet() && rhs.sampleTemperatureKIsSet() && getSampleTemperatureK() == rhs.getSampleTemperatureK())) &&
((!poniRot1RadIsSet() && !rhs.poniRot1RadIsSet()) || (poniRot1RadIsSet() && rhs.poniRot1RadIsSet() && getPoniRot1Rad() == rhs.getPoniRot1Rad())) &&
((!poniRot2RadIsSet() && !rhs.poniRot2RadIsSet()) || (poniRot2RadIsSet() && rhs.poniRot2RadIsSet() && getPoniRot2Rad() == rhs.getPoniRot2Rad())) &&
((!poniRot3RadIsSet() && !rhs.poniRot3RadIsSet()) || (poniRot3RadIsSet() && rhs.poniRot3RadIsSet() && getPoniRot3Rad() == rhs.getPoniRot3Rad())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell()))
;
}
bool Dataset_settings::operator!=(const Dataset_settings& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Dataset_settings& o)
{
j = nlohmann::json::object();
if(o.imagesPerTriggerIsSet())
j["images_per_trigger"] = o.m_Images_per_trigger;
if(o.ntriggerIsSet())
j["ntrigger"] = o.m_Ntrigger;
if(o.imageTimeUsIsSet())
j["image_time_us"] = o.m_Image_time_us;
j["beam_x_pxl"] = o.m_Beam_x_pxl;
j["beam_y_pxl"] = o.m_Beam_y_pxl;
j["detector_distance_mm"] = o.m_Detector_distance_mm;
j["incident_energy_keV"] = o.m_Incident_energy_keV;
if(o.filePrefixIsSet())
j["file_prefix"] = o.m_File_prefix;
if(o.imagesPerFileIsSet())
j["images_per_file"] = o.m_Images_per_file;
if(o.spaceGroupNumberIsSet())
j["space_group_number"] = o.m_Space_group_number;
if(o.sampleNameIsSet())
j["sample_name"] = o.m_Sample_name;
if(o.compressionIsSet())
j["compression"] = o.m_Compression;
if(o.totalFluxIsSet())
j["total_flux"] = o.m_Total_flux;
if(o.transmissionIsSet())
j["transmission"] = o.m_Transmission;
if(o.goniometerIsSet())
j["goniometer"] = o.m_Goniometer;
if(o.gridScanIsSet())
j["grid_scan"] = o.m_Grid_scan;
if(o.headerAppendixIsSet())
j["header_appendix"] = o.m_Header_appendix;
if(o.imageAppendixIsSet())
j["image_appendix"] = o.m_Image_appendix;
if(o.dataReductionFactorSerialmxIsSet())
j["data_reduction_factor_serialmx"] = o.m_Data_reduction_factor_serialmx;
if(o.pixelValueLowThresholdIsSet())
j["pixel_value_low_threshold"] = o.m_Pixel_value_low_threshold;
if(o.runNumberIsSet())
j["run_number"] = o.m_Run_number;
if(o.runNameIsSet())
j["run_name"] = o.m_Run_name;
if(o.experimentGroupIsSet())
j["experiment_group"] = o.m_Experiment_group;
if(o.poissonCompressionIsSet())
j["poisson_compression"] = o.m_Poisson_compression;
if(o.writeNxmxHdf5MasterIsSet())
j["write_nxmx_hdf5_master"] = o.m_Write_nxmx_hdf5_master;
if(o.saveCalibrationIsSet())
j["save_calibration"] = o.m_Save_calibration;
if(o.polarizationFactorIsSet())
j["polarization_factor"] = o.m_Polarization_factor;
if(o.ringCurrentMAIsSet())
j["ring_current_mA"] = o.m_Ring_current_mA;
if(o.sampleTemperatureKIsSet())
j["sample_temperature_K"] = o.m_Sample_temperature_K;
if(o.poniRot1RadIsSet())
j["poni_rot1_rad"] = o.m_Poni_rot1_rad;
if(o.poniRot2RadIsSet())
j["poni_rot2_rad"] = o.m_Poni_rot2_rad;
if(o.poniRot3RadIsSet())
j["poni_rot3_rad"] = o.m_Poni_rot3_rad;
if(o.unitCellIsSet())
j["unit_cell"] = o.m_Unit_cell;
}
void from_json(const nlohmann::json& j, Dataset_settings& o)
{
if(j.find("images_per_trigger") != j.end())
{
j.at("images_per_trigger").get_to(o.m_Images_per_trigger);
o.m_Images_per_triggerIsSet = true;
}
if(j.find("ntrigger") != j.end())
{
j.at("ntrigger").get_to(o.m_Ntrigger);
o.m_NtriggerIsSet = true;
}
if(j.find("image_time_us") != j.end())
{
j.at("image_time_us").get_to(o.m_Image_time_us);
o.m_Image_time_usIsSet = true;
}
j.at("beam_x_pxl").get_to(o.m_Beam_x_pxl);
j.at("beam_y_pxl").get_to(o.m_Beam_y_pxl);
j.at("detector_distance_mm").get_to(o.m_Detector_distance_mm);
j.at("incident_energy_keV").get_to(o.m_Incident_energy_keV);
if(j.find("file_prefix") != j.end())
{
j.at("file_prefix").get_to(o.m_File_prefix);
o.m_File_prefixIsSet = true;
}
if(j.find("images_per_file") != j.end())
{
j.at("images_per_file").get_to(o.m_Images_per_file);
o.m_Images_per_fileIsSet = true;
}
if(j.find("space_group_number") != j.end())
{
j.at("space_group_number").get_to(o.m_Space_group_number);
o.m_Space_group_numberIsSet = true;
}
if(j.find("sample_name") != j.end())
{
j.at("sample_name").get_to(o.m_Sample_name);
o.m_Sample_nameIsSet = true;
}
if(j.find("compression") != j.end())
{
j.at("compression").get_to(o.m_Compression);
o.m_CompressionIsSet = true;
}
if(j.find("total_flux") != j.end())
{
j.at("total_flux").get_to(o.m_Total_flux);
o.m_Total_fluxIsSet = true;
}
if(j.find("transmission") != j.end())
{
j.at("transmission").get_to(o.m_Transmission);
o.m_TransmissionIsSet = true;
}
if(j.find("goniometer") != j.end())
{
j.at("goniometer").get_to(o.m_Goniometer);
o.m_GoniometerIsSet = true;
}
if(j.find("grid_scan") != j.end())
{
j.at("grid_scan").get_to(o.m_Grid_scan);
o.m_Grid_scanIsSet = true;
}
if(j.find("header_appendix") != j.end())
{
j.at("header_appendix").get_to(o.m_Header_appendix);
o.m_Header_appendixIsSet = true;
}
if(j.find("image_appendix") != j.end())
{
j.at("image_appendix").get_to(o.m_Image_appendix);
o.m_Image_appendixIsSet = true;
}
if(j.find("data_reduction_factor_serialmx") != j.end())
{
j.at("data_reduction_factor_serialmx").get_to(o.m_Data_reduction_factor_serialmx);
o.m_Data_reduction_factor_serialmxIsSet = true;
}
if(j.find("pixel_value_low_threshold") != j.end())
{
j.at("pixel_value_low_threshold").get_to(o.m_Pixel_value_low_threshold);
o.m_Pixel_value_low_thresholdIsSet = true;
}
if(j.find("run_number") != j.end())
{
j.at("run_number").get_to(o.m_Run_number);
o.m_Run_numberIsSet = true;
}
if(j.find("run_name") != j.end())
{
j.at("run_name").get_to(o.m_Run_name);
o.m_Run_nameIsSet = true;
}
if(j.find("experiment_group") != j.end())
{
j.at("experiment_group").get_to(o.m_Experiment_group);
o.m_Experiment_groupIsSet = true;
}
if(j.find("poisson_compression") != j.end())
{
j.at("poisson_compression").get_to(o.m_Poisson_compression);
o.m_Poisson_compressionIsSet = true;
}
if(j.find("write_nxmx_hdf5_master") != j.end())
{
j.at("write_nxmx_hdf5_master").get_to(o.m_Write_nxmx_hdf5_master);
o.m_Write_nxmx_hdf5_masterIsSet = true;
}
if(j.find("save_calibration") != j.end())
{
j.at("save_calibration").get_to(o.m_Save_calibration);
o.m_Save_calibrationIsSet = true;
}
if(j.find("polarization_factor") != j.end())
{
j.at("polarization_factor").get_to(o.m_Polarization_factor);
o.m_Polarization_factorIsSet = true;
}
if(j.find("ring_current_mA") != j.end())
{
j.at("ring_current_mA").get_to(o.m_Ring_current_mA);
o.m_Ring_current_mAIsSet = true;
}
if(j.find("sample_temperature_K") != j.end())
{
j.at("sample_temperature_K").get_to(o.m_Sample_temperature_K);
o.m_Sample_temperature_KIsSet = true;
}
if(j.find("poni_rot1_rad") != j.end())
{
j.at("poni_rot1_rad").get_to(o.m_Poni_rot1_rad);
o.m_Poni_rot1_radIsSet = true;
}
if(j.find("poni_rot2_rad") != j.end())
{
j.at("poni_rot2_rad").get_to(o.m_Poni_rot2_rad);
o.m_Poni_rot2_radIsSet = true;
}
if(j.find("poni_rot3_rad") != j.end())
{
j.at("poni_rot3_rad").get_to(o.m_Poni_rot3_rad);
o.m_Poni_rot3_radIsSet = true;
}
if(j.find("unit_cell") != j.end())
{
j.at("unit_cell").get_to(o.m_Unit_cell);
o.m_Unit_cellIsSet = true;
}
}
int64_t Dataset_settings::getImagesPerTrigger() const
{
return m_Images_per_trigger;
}
void Dataset_settings::setImagesPerTrigger(int64_t const value)
{
m_Images_per_trigger = value;
m_Images_per_triggerIsSet = true;
}
bool Dataset_settings::imagesPerTriggerIsSet() const
{
return m_Images_per_triggerIsSet;
}
void Dataset_settings::unsetImages_per_trigger()
{
m_Images_per_triggerIsSet = false;
}
int64_t Dataset_settings::getNtrigger() const
{
return m_Ntrigger;
}
void Dataset_settings::setNtrigger(int64_t const value)
{
m_Ntrigger = value;
m_NtriggerIsSet = true;
}
bool Dataset_settings::ntriggerIsSet() const
{
return m_NtriggerIsSet;
}
void Dataset_settings::unsetNtrigger()
{
m_NtriggerIsSet = false;
}
int64_t Dataset_settings::getImageTimeUs() const
{
return m_Image_time_us;
}
void Dataset_settings::setImageTimeUs(int64_t const value)
{
m_Image_time_us = value;
m_Image_time_usIsSet = true;
}
bool Dataset_settings::imageTimeUsIsSet() const
{
return m_Image_time_usIsSet;
}
void Dataset_settings::unsetImage_time_us()
{
m_Image_time_usIsSet = false;
}
float Dataset_settings::getBeamXPxl() const
{
return m_Beam_x_pxl;
}
void Dataset_settings::setBeamXPxl(float const value)
{
m_Beam_x_pxl = value;
}
float Dataset_settings::getBeamYPxl() const
{
return m_Beam_y_pxl;
}
void Dataset_settings::setBeamYPxl(float const value)
{
m_Beam_y_pxl = value;
}
float Dataset_settings::getDetectorDistanceMm() const
{
return m_Detector_distance_mm;
}
void Dataset_settings::setDetectorDistanceMm(float const value)
{
m_Detector_distance_mm = value;
}
float Dataset_settings::getIncidentEnergyKeV() const
{
return m_Incident_energy_keV;
}
void Dataset_settings::setIncidentEnergyKeV(float const value)
{
m_Incident_energy_keV = value;
}
std::string Dataset_settings::getFilePrefix() const
{
return m_File_prefix;
}
void Dataset_settings::setFilePrefix(std::string const& value)
{
m_File_prefix = value;
m_File_prefixIsSet = true;
}
bool Dataset_settings::filePrefixIsSet() const
{
return m_File_prefixIsSet;
}
void Dataset_settings::unsetFile_prefix()
{
m_File_prefixIsSet = false;
}
int64_t Dataset_settings::getImagesPerFile() const
{
return m_Images_per_file;
}
void Dataset_settings::setImagesPerFile(int64_t const value)
{
m_Images_per_file = value;
m_Images_per_fileIsSet = true;
}
bool Dataset_settings::imagesPerFileIsSet() const
{
return m_Images_per_fileIsSet;
}
void Dataset_settings::unsetImages_per_file()
{
m_Images_per_fileIsSet = false;
}
int64_t Dataset_settings::getSpaceGroupNumber() const
{
return m_Space_group_number;
}
void Dataset_settings::setSpaceGroupNumber(int64_t const value)
{
m_Space_group_number = value;
m_Space_group_numberIsSet = true;
}
bool Dataset_settings::spaceGroupNumberIsSet() const
{
return m_Space_group_numberIsSet;
}
void Dataset_settings::unsetSpace_group_number()
{
m_Space_group_numberIsSet = false;
}
std::string Dataset_settings::getSampleName() const
{
return m_Sample_name;
}
void Dataset_settings::setSampleName(std::string const& value)
{
m_Sample_name = value;
m_Sample_nameIsSet = true;
}
bool Dataset_settings::sampleNameIsSet() const
{
return m_Sample_nameIsSet;
}
void Dataset_settings::unsetSample_name()
{
m_Sample_nameIsSet = false;
}
std::string Dataset_settings::getCompression() const
{
return m_Compression;
}
void Dataset_settings::setCompression(std::string const& value)
{
m_Compression = value;
m_CompressionIsSet = true;
}
bool Dataset_settings::compressionIsSet() const
{
return m_CompressionIsSet;
}
void Dataset_settings::unsetCompression()
{
m_CompressionIsSet = false;
}
float Dataset_settings::getTotalFlux() const
{
return m_Total_flux;
}
void Dataset_settings::setTotalFlux(float const value)
{
m_Total_flux = value;
m_Total_fluxIsSet = true;
}
bool Dataset_settings::totalFluxIsSet() const
{
return m_Total_fluxIsSet;
}
void Dataset_settings::unsetTotal_flux()
{
m_Total_fluxIsSet = false;
}
float Dataset_settings::getTransmission() const
{
return m_Transmission;
}
void Dataset_settings::setTransmission(float const value)
{
m_Transmission = value;
m_TransmissionIsSet = true;
}
bool Dataset_settings::transmissionIsSet() const
{
return m_TransmissionIsSet;
}
void Dataset_settings::unsetTransmission()
{
m_TransmissionIsSet = false;
}
org::openapitools::server::model::Rotation_axis Dataset_settings::getGoniometer() const
{
return m_Goniometer;
}
void Dataset_settings::setGoniometer(org::openapitools::server::model::Rotation_axis const& value)
{
m_Goniometer = value;
m_GoniometerIsSet = true;
}
bool Dataset_settings::goniometerIsSet() const
{
return m_GoniometerIsSet;
}
void Dataset_settings::unsetGoniometer()
{
m_GoniometerIsSet = false;
}
org::openapitools::server::model::Grid_scan Dataset_settings::getGridScan() const
{
return m_Grid_scan;
}
void Dataset_settings::setGridScan(org::openapitools::server::model::Grid_scan const& value)
{
m_Grid_scan = value;
m_Grid_scanIsSet = true;
}
bool Dataset_settings::gridScanIsSet() const
{
return m_Grid_scanIsSet;
}
void Dataset_settings::unsetGrid_scan()
{
m_Grid_scanIsSet = false;
}
nlohmann::json Dataset_settings::getHeaderAppendix() const
{
return m_Header_appendix;
}
void Dataset_settings::setHeaderAppendix(nlohmann::json const& value)
{
m_Header_appendix = value;
m_Header_appendixIsSet = true;
}
bool Dataset_settings::headerAppendixIsSet() const
{
return m_Header_appendixIsSet;
}
void Dataset_settings::unsetHeader_appendix()
{
m_Header_appendixIsSet = false;
}
nlohmann::json Dataset_settings::getImageAppendix() const
{
return m_Image_appendix;
}
void Dataset_settings::setImageAppendix(nlohmann::json const& value)
{
m_Image_appendix = value;
m_Image_appendixIsSet = true;
}
bool Dataset_settings::imageAppendixIsSet() const
{
return m_Image_appendixIsSet;
}
void Dataset_settings::unsetImage_appendix()
{
m_Image_appendixIsSet = false;
}
float Dataset_settings::getDataReductionFactorSerialmx() const
{
return m_Data_reduction_factor_serialmx;
}
void Dataset_settings::setDataReductionFactorSerialmx(float const value)
{
m_Data_reduction_factor_serialmx = value;
m_Data_reduction_factor_serialmxIsSet = true;
}
bool Dataset_settings::dataReductionFactorSerialmxIsSet() const
{
return m_Data_reduction_factor_serialmxIsSet;
}
void Dataset_settings::unsetData_reduction_factor_serialmx()
{
m_Data_reduction_factor_serialmxIsSet = false;
}
int64_t Dataset_settings::getPixelValueLowThreshold() const
{
return m_Pixel_value_low_threshold;
}
void Dataset_settings::setPixelValueLowThreshold(int64_t const value)
{
m_Pixel_value_low_threshold = value;
m_Pixel_value_low_thresholdIsSet = true;
}
bool Dataset_settings::pixelValueLowThresholdIsSet() const
{
return m_Pixel_value_low_thresholdIsSet;
}
void Dataset_settings::unsetPixel_value_low_threshold()
{
m_Pixel_value_low_thresholdIsSet = false;
}
int64_t Dataset_settings::getRunNumber() const
{
return m_Run_number;
}
void Dataset_settings::setRunNumber(int64_t const value)
{
m_Run_number = value;
m_Run_numberIsSet = true;
}
bool Dataset_settings::runNumberIsSet() const
{
return m_Run_numberIsSet;
}
void Dataset_settings::unsetRun_number()
{
m_Run_numberIsSet = false;
}
std::string Dataset_settings::getRunName() const
{
return m_Run_name;
}
void Dataset_settings::setRunName(std::string const& value)
{
m_Run_name = value;
m_Run_nameIsSet = true;
}
bool Dataset_settings::runNameIsSet() const
{
return m_Run_nameIsSet;
}
void Dataset_settings::unsetRun_name()
{
m_Run_nameIsSet = false;
}
std::string Dataset_settings::getExperimentGroup() const
{
return m_Experiment_group;
}
void Dataset_settings::setExperimentGroup(std::string const& value)
{
m_Experiment_group = value;
m_Experiment_groupIsSet = true;
}
bool Dataset_settings::experimentGroupIsSet() const
{
return m_Experiment_groupIsSet;
}
void Dataset_settings::unsetExperiment_group()
{
m_Experiment_groupIsSet = false;
}
int64_t Dataset_settings::getPoissonCompression() const
{
return m_Poisson_compression;
}
void Dataset_settings::setPoissonCompression(int64_t const value)
{
m_Poisson_compression = value;
m_Poisson_compressionIsSet = true;
}
bool Dataset_settings::poissonCompressionIsSet() const
{
return m_Poisson_compressionIsSet;
}
void Dataset_settings::unsetPoisson_compression()
{
m_Poisson_compressionIsSet = false;
}
bool Dataset_settings::isWriteNxmxHdf5Master() const
{
return m_Write_nxmx_hdf5_master;
}
void Dataset_settings::setWriteNxmxHdf5Master(bool const value)
{
m_Write_nxmx_hdf5_master = value;
m_Write_nxmx_hdf5_masterIsSet = true;
}
bool Dataset_settings::writeNxmxHdf5MasterIsSet() const
{
return m_Write_nxmx_hdf5_masterIsSet;
}
void Dataset_settings::unsetWrite_nxmx_hdf5_master()
{
m_Write_nxmx_hdf5_masterIsSet = false;
}
bool Dataset_settings::isSaveCalibration() const
{
return m_Save_calibration;
}
void Dataset_settings::setSaveCalibration(bool const value)
{
m_Save_calibration = value;
m_Save_calibrationIsSet = true;
}
bool Dataset_settings::saveCalibrationIsSet() const
{
return m_Save_calibrationIsSet;
}
void Dataset_settings::unsetSave_calibration()
{
m_Save_calibrationIsSet = false;
}
float Dataset_settings::getPolarizationFactor() const
{
return m_Polarization_factor;
}
void Dataset_settings::setPolarizationFactor(float const value)
{
m_Polarization_factor = value;
m_Polarization_factorIsSet = true;
}
bool Dataset_settings::polarizationFactorIsSet() const
{
return m_Polarization_factorIsSet;
}
void Dataset_settings::unsetPolarization_factor()
{
m_Polarization_factorIsSet = false;
}
float Dataset_settings::getRingCurrentMA() const
{
return m_Ring_current_mA;
}
void Dataset_settings::setRingCurrentMA(float const value)
{
m_Ring_current_mA = value;
m_Ring_current_mAIsSet = true;
}
bool Dataset_settings::ringCurrentMAIsSet() const
{
return m_Ring_current_mAIsSet;
}
void Dataset_settings::unsetRing_current_mA()
{
m_Ring_current_mAIsSet = false;
}
float Dataset_settings::getSampleTemperatureK() const
{
return m_Sample_temperature_K;
}
void Dataset_settings::setSampleTemperatureK(float const value)
{
m_Sample_temperature_K = value;
m_Sample_temperature_KIsSet = true;
}
bool Dataset_settings::sampleTemperatureKIsSet() const
{
return m_Sample_temperature_KIsSet;
}
void Dataset_settings::unsetSample_temperature_K()
{
m_Sample_temperature_KIsSet = false;
}
float Dataset_settings::getPoniRot1Rad() const
{
return m_Poni_rot1_rad;
}
void Dataset_settings::setPoniRot1Rad(float const value)
{
m_Poni_rot1_rad = value;
m_Poni_rot1_radIsSet = true;
}
bool Dataset_settings::poniRot1RadIsSet() const
{
return m_Poni_rot1_radIsSet;
}
void Dataset_settings::unsetPoni_rot1_rad()
{
m_Poni_rot1_radIsSet = false;
}
float Dataset_settings::getPoniRot2Rad() const
{
return m_Poni_rot2_rad;
}
void Dataset_settings::setPoniRot2Rad(float const value)
{
m_Poni_rot2_rad = value;
m_Poni_rot2_radIsSet = true;
}
bool Dataset_settings::poniRot2RadIsSet() const
{
return m_Poni_rot2_radIsSet;
}
void Dataset_settings::unsetPoni_rot2_rad()
{
m_Poni_rot2_radIsSet = false;
}
float Dataset_settings::getPoniRot3Rad() const
{
return m_Poni_rot3_rad;
}
void Dataset_settings::setPoniRot3Rad(float const value)
{
m_Poni_rot3_rad = value;
m_Poni_rot3_radIsSet = true;
}
bool Dataset_settings::poniRot3RadIsSet() const
{
return m_Poni_rot3_radIsSet;
}
void Dataset_settings::unsetPoni_rot3_rad()
{
m_Poni_rot3_radIsSet = false;
}
org::openapitools::server::model::Unit_cell Dataset_settings::getUnitCell() const
{
return m_Unit_cell;
}
void Dataset_settings::setUnitCell(org::openapitools::server::model::Unit_cell const& value)
{
m_Unit_cell = value;
m_Unit_cellIsSet = true;
}
bool Dataset_settings::unitCellIsSet() const
{
return m_Unit_cellIsSet;
}
void Dataset_settings::unsetUnit_cell()
{
m_Unit_cellIsSet = false;
}
} // namespace org::openapitools::server::model