updated parsing of old Moench json files
Some checks failed
Build on RHEL8 / build (push) Failing after 2m16s
Build on RHEL9 / build (push) Failing after 2m32s
Run tests using data on local RHEL8 / build (push) Successful in 3m9s

This commit is contained in:
2026-02-03 16:55:30 +01:00
parent 8c8d635b0c
commit 6b4a2a6fb1

View File

@@ -285,22 +285,15 @@ void RawMasterFile::parse_json(std::istream &is) {
// ----------------------------------------------------------------
// Special treatment of analog flag because of Moench03
m_analog_flag = v < 8.0 && (m_type == DetectorType::Moench);
try {
m_analog_flag = static_cast<bool>(j.at("Analog Flag").get<int>());
} catch (const json::out_of_range &e) {
// if it doesn't work still set it to one
// to try to decode analog samples (Old Moench03)
m_analog_flag = true;
}
try {
if (m_analog_flag) {
m_analog_samples = j.at("Analog Samples");
}
} catch (const json::out_of_range &e) {
// keep the optional empty
// and set analog flag to 0
m_analog_flag = false;
}
//-----------------------------------------------------------------
try {