From 9f2b4872e4f5fab2bbaf37819919d4e97c975beb Mon Sep 17 00:00:00 2001 From: Felix Schlepper Date: Fri, 12 Sep 2025 13:55:30 +0200 Subject: [PATCH 1/2] ITS: Tracker don't print expected exception If we are catching the expected exception std::bad_alloc, the print is superfluous. Also the validation script explicitly regex checks the log for this string leading to jobs being failed although the reco was successful. If the exception is anything different, still print it. --- Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx b/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx index e8212f4ad53a1..beaeecf4d549a 100644 --- a/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx +++ b/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx @@ -66,7 +66,9 @@ void Tracker::clustersToTracks(const LogFunc& logger, const LogFunc& er LOGP(error, "Too much memory used during {} in iteration {} in ROF span {}-{} iVtx={}: {:.2f} GB. Current limit is {:.2f} GB, check the detector status and/or the selections.", StateNames[mCurState], iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, iVertex, (double)mTimeFrame->getArtefactsMemory() / GB, (double)mTrkParams[iteration].MaxMemory / GB); - LOGP(error, "Exception: {}", err.what()); + if (typeid(err) != typeid(std::bad_alloc) { // only print if the exceptions is different from what is expected + LOGP(error, "Exception: {}", err.what()); + } if (mTrkParams[iteration].DropTFUponFailure) { mMemoryPool->print(); mTimeFrame->wipe(); From 4f4fe91ee072cec1612c6a3c91c11d1c4abf782b Mon Sep 17 00:00:00 2001 From: Felix Schlepper Date: Fri, 12 Sep 2025 14:24:17 +0200 Subject: [PATCH 2/2] Update Tracker.cxx --- Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx b/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx index beaeecf4d549a..c6eee88a9f48b 100644 --- a/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx +++ b/Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx @@ -66,7 +66,7 @@ void Tracker::clustersToTracks(const LogFunc& logger, const LogFunc& er LOGP(error, "Too much memory used during {} in iteration {} in ROF span {}-{} iVtx={}: {:.2f} GB. Current limit is {:.2f} GB, check the detector status and/or the selections.", StateNames[mCurState], iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, iVertex, (double)mTimeFrame->getArtefactsMemory() / GB, (double)mTrkParams[iteration].MaxMemory / GB); - if (typeid(err) != typeid(std::bad_alloc) { // only print if the exceptions is different from what is expected + if (typeid(err) != typeid(std::bad_alloc)) { // only print if the exceptions is different from what is expected LOGP(error, "Exception: {}", err.what()); } if (mTrkParams[iteration].DropTFUponFailure) {