diff --git a/src/RawMasterFile.cpp b/src/RawMasterFile.cpp index c913735..faff25e 100644 --- a/src/RawMasterFile.cpp +++ b/src/RawMasterFile.cpp @@ -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(j.at("Analog Flag").get()); - } 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 {