From a82dc1c95de684052cae89638514c544b08648ef Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Mon, 6 Jan 2025 10:57:33 +0100 Subject: [PATCH] DPL Analysis: out-of-line throws --- Framework/Core/include/Framework/ASoA.h | 7 ++++-- .../Core/include/Framework/ASoAHelpers.h | 7 +++--- .../include/Framework/IndexBuilderHelpers.h | 5 +++-- Framework/Core/src/ASoA.cxx | 10 +++++++++ Framework/Core/src/ASoAHelpers.cxx | 22 +++++++++++++++++++ Framework/Core/src/IndexBuilderHelpers.cxx | 6 +++++ 6 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 Framework/Core/src/ASoAHelpers.cxx diff --git a/Framework/Core/include/Framework/ASoA.h b/Framework/Core/include/Framework/ASoA.h index 6894eda42dccf..7b0b69ec8941f 100644 --- a/Framework/Core/include/Framework/ASoA.h +++ b/Framework/Core/include/Framework/ASoA.h @@ -2126,6 +2126,9 @@ class Table template using InPlaceTable = Table, o2::aod::Hash, o2::aod::Hash<"TEST"_h>, C...>; +void getterNotFound(const char* targetColumnLabel); +void emptyColumnLabel(); + namespace row_helpers { template @@ -2232,7 +2235,7 @@ ColumnGetterFunction getColumnGetterByLabel(o2::framework::pack, co (void)((func = createGetterPtr(targetColumnLabel), func) || ...); if (!func) { - throw framework::runtime_error_f("Getter for \"%s\" not found", targetColumnLabel); + getterNotFound(targetColumnLabel.data()); } return func; @@ -2248,7 +2251,7 @@ ColumnGetterFunction getColumnGetterByLabel(const std:: using TypesWithCommonGetter = o2::framework::selected_pack_multicondition, typename T::columns_t>; if (targetColumnLabel.size() == 0) { - throw framework::runtime_error("columnLabel: must not be empty"); + emptyColumnLabel(); } return getColumnGetterByLabel(TypesWithCommonGetter{}, targetColumnLabel); diff --git a/Framework/Core/include/Framework/ASoAHelpers.h b/Framework/Core/include/Framework/ASoAHelpers.h index 6de6662769ef7..5bf474e61f935 100644 --- a/Framework/Core/include/Framework/ASoAHelpers.h +++ b/Framework/Core/include/Framework/ASoAHelpers.h @@ -14,7 +14,6 @@ #include "Framework/ASoA.h" #include "Framework/BinningPolicy.h" -#include "Framework/RuntimeError.h" #include #include @@ -72,6 +71,8 @@ inline bool diffCategory(BinningIndex const& a, BinningIndex const& b) return a.bin >= b.bin; } +void dataSizeVariesBetweenColumns(); + template