@@ -1351,7 +1351,7 @@ static constexpr std::pair<bool, framework::ConcreteDataMatcher> hasKeyM(std::st
13511351}
13521352
13531353void notFoundColumn (const char * label, const char * key);
1354- void missingOptionalPreslice (const char * label, const char * key);
1354+ void missingPreslice (const char * label, const char * key);
13551355
13561356template <with_originals T, bool OPT = false >
13571357static constexpr std::string getLabelFromTypeForKey (std::string_view key)
@@ -1421,7 +1421,6 @@ namespace o2::framework
14211421// / tracks origin in bindingKey matcher to handle the correct arguments
14221422struct PreslicePolicyBase {
14231423 static constexpr void isPreslicePolicy () {};
1424- const std::string binding;
14251424 Entry bindingKey;
14261425
14271426 bool isMissing () const ;
@@ -1448,29 +1447,28 @@ struct PresliceBase : public Policy {
14481447 constexpr static bool optional = OPT ;
14491448 using target_t = T;
14501449 using policy_t = Policy;
1451- const std::string binding;
14521450
14531451 PresliceBase (expressions::BindingNode index_)
1454- : Policy{PreslicePolicyBase{{o2::soa::getLabelFromTypeForKey<T, OPT >(std::string{index_.name })}, Entry (o2::soa::getLabelFromTypeForKey<T, OPT >(std::string{index_.name }), o2::soa::getMatcherFromTypeForKey<T, OPT >(std::string{index_.name }), std::string{index_.name })}, {}}
1452+ : Policy{Entry (
1453+ o2::soa::getLabelFromTypeForKey<T, OPT >(std::string{index_.name }),
1454+ o2::soa::getMatcherFromTypeForKey<T, OPT >(std::string{index_.name }),
1455+ std::string{index_.name }
1456+ )}
14551457 {
14561458 }
14571459
14581460 o2::soa::ArrowTableRef getSliceFor (int value, o2::soa::ArrowTableRef const & input) const
14591461 {
1460- if constexpr (OPT ) {
1461- if (Policy::isMissing ()) {
1462- return {nullptr , {0 , 0 }};
1463- }
1462+ if (Policy::isMissing ()) {
1463+ return {nullptr , {0 , 0 }};
14641464 }
14651465 return Policy::getSliceFor (value, input);
14661466 }
14671467
14681468 std::span<const int64_t > getSliceFor (int value) const
14691469 {
1470- if constexpr (OPT ) {
1471- if (Policy::isMissing ()) {
1472- return {};
1473- }
1470+ if (Policy::isMissing ()) {
1471+ return {};
14741472 }
14751473 return Policy::getSliceFor (value);
14761474 }
@@ -1526,10 +1524,8 @@ template <typename T, typename C, typename Policy, bool OPT>
15261524 requires std::same_as<Policy, framework::PreslicePolicySorted> && (o2::soa::is_binding_compatible_v<C, T>())
15271525auto doSliceBy (T const * table, o2::framework::PresliceBase<C, Policy, OPT > const & container, int value)
15281526{
1529- if constexpr (OPT ) {
1530- if (container.isMissing ()) {
1531- missingOptionalPreslice (getLabelFromType<std::decay_t <T>>().data (), container.bindingKey .key .c_str ());
1532- }
1527+ if (container.isMissing ()) {
1528+ missingPreslice (getLabelFromType<std::decay_t <T>>().data (), container.bindingKey .key .c_str ());
15331529 }
15341530 auto out = container.getSliceFor (value, table->asArrowTableRef ());
15351531 auto t = typename T::self_t ({out});
@@ -1568,10 +1564,8 @@ template <typename T, typename C, typename Policy, bool OPT>
15681564 requires std::same_as<Policy, framework::PreslicePolicyGeneral> && (o2::soa::is_binding_compatible_v<C, T>())
15691565auto doSliceBy (T const * table, o2::framework::PresliceBase<C, Policy, OPT > const & container, int value)
15701566{
1571- if constexpr (OPT ) {
1572- if (container.isMissing ()) {
1573- missingOptionalPreslice (getLabelFromType<std::decay_t <T>>().data (), container.bindingKey .key .c_str ());
1574- }
1567+ if (container.isMissing ()) {
1568+ missingPreslice (getLabelFromType<std::decay_t <T>>().data (), container.bindingKey .key .c_str ());
15751569 }
15761570 auto selection = container.getSliceFor (value);
15771571 return doSliceByHelper (table, selection);
@@ -1601,10 +1595,8 @@ template <soa::is_filtered_table T, typename C, bool OPT>
16011595 requires (o2::soa::is_binding_compatible_v<C, T>())
16021596auto doFilteredSliceBy (T const * table, o2::framework::PresliceBase<C, framework::PreslicePolicySorted, OPT > const & container, int value)
16031597{
1604- if constexpr (OPT ) {
1605- if (container.isMissing ()) {
1606- missingOptionalPreslice (getLabelFromType<T>().data (), container.bindingKey .key .c_str ());
1607- }
1598+ if (container.isMissing ()) {
1599+ missingPreslice (getLabelFromType<T>().data (), container.bindingKey .key .c_str ());
16081600 }
16091601 auto slice = container.getSliceFor (value, table->asArrowTableRef ());
16101602 return prepareFilteredSlice (table, slice);
0 commit comments