diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx index b826e62d1e71f38bccca0d13d7cf14f3f1ff81ba..3abd2874e21f9ee03529c1f59bfccaa8f16982c2 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx @@ -234,9 +234,10 @@ StatusCode MuonAlignmentCondAlg::parseDataFromJSON(const nlohmann::json& lines, newALine.setAmdbId(stationType, stationEta, stationPhi, multiLayer); newALine.setParameters(line["svalue"], line["zvalue"], line["tvalue"], line["tsv"], line["tzv"], line["ttv"]); - if (newALine && !writeALineCdo.insert(std::move(newALine)).second) { - ATH_MSG_FATAL("Failed to insert A line for "<<m_idHelperSvc->toString(id)); - return StatusCode::FAILURE; + auto aLineInsert = writeALineCdo.insert(newALine); + if (newALine && !aLineInsert.second) { + ATH_MSG_WARNING("Failed to insert A line "<<newALine<<" for "<<m_idHelperSvc->toString(id) + <<" because "<<(*aLineInsert.first)<<" has been added before"); } ATH_MSG_VERBOSE("Inserted new a Line "<<newALine<<" "<<m_idHelperSvc->toString(id)); @@ -251,9 +252,10 @@ StatusCode MuonAlignmentCondAlg::parseDataFromJSON(const nlohmann::json& lines, newBLine.setIdentifier(id); newBLine.setAmdbId(stationType, stationEta, stationPhi, multiLayer); ATH_MSG_VERBOSE(" HardwareChamberName " << static_cast<std::string>(line["hwElement"])); - if (newBLine && !writeBLineCdo.insert(std::move(newBLine)).second){ - ATH_MSG_FATAL("Failed to insert B line for "<<m_idHelperSvc->toString(id)); - return StatusCode::FAILURE; + auto bLineInsert = writeBLineCdo.insert(newBLine); + if (newBLine && !bLineInsert.second){ + ATH_MSG_WARNING("Failed to insert B line "<<newBLine<<" for "<<m_idHelperSvc->toString(id) + <<" because "<<(*bLineInsert.first)<<" has been added before."); } } return StatusCode::SUCCESS;