@@ -2855,77 +2855,77 @@ consteval auto getIndexTargets()
28552855#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL (_Name_, _Getter_, _Type_, _Label_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_COMPLETE(_Name_, _Getter_, _Type_, _Label_, void )
28562856#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN (_Name_, _Getter_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL(_Name_, _Getter_, int32_t , " _" #_Name_)
28572857// / SELF ARRAY
2858- #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
2859- struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
2860- static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
2861- static constexpr const char * mLabel = " fIndexArray" _Label_; \
2862- using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
2863- using type = std::vector<_Type_>; \
2864- using column_t = _Name_##Ids; \
2865- using self_index_t = std::true_type; \
2866- using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
2867- _Name_##Ids(arrow::ChunkedArray const * column) \
2868- : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
2869- { \
2870- } \
2871- \
2872- _Name_##Ids() = default ; \
2873- _Name_##Ids(_Name_##Ids const & other) = default ; \
2874- _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
2875- gsl::span<const _Type_> inline getIds () const \
2876- { \
2877- return _Getter_##Ids (); \
2878- } \
2879- \
2880- gsl::span<const _Type_> _Getter_##Ids() const \
2881- { \
2882- return *mColumnIterator ; \
2883- } \
2884- \
2885- bool has_##_Getter_() const \
2886- { \
2887- return !(*mColumnIterator ).empty (); \
2888- } \
2889- \
2890- template <typename T> \
2891- auto _Getter_##_as() const \
2892- { \
2893- auto t = mBinding .get <T>(); \
2894- if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
2895- o2::soa::dereferenceWithWrongType (); \
2896- } \
2897- return getIterators<T>(); \
2898- } \
2899- \
2900- template <typename T> \
2901- auto getIterators () const \
2902- { \
2903- auto result = std::vector<typename T::unfiltered_iterator>(); \
2904- for (auto & i : *mColumnIterator ) { \
2905- result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
2906- } \
2907- return result; \
2908- } \
2909- \
2910- template <typename T> \
2911- auto _Getter_##_first_as() const \
2912- { \
2913- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
2914- } \
2915- \
2916- template <typename T> \
2917- auto _Getter_##_last_as() const \
2918- { \
2919- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
2920- } \
2921- \
2922- bool setCurrentRaw (o2::soa::Binding current) \
2923- { \
2924- this ->mBinding = current; \
2925- return true ; \
2926- } \
2927- o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
2928- o2::soa::Binding mBinding ; \
2858+ #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
2859+ struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
2860+ static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
2861+ static constexpr const char * mLabel = " fIndexArray" _Label_; \
2862+ using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
2863+ using type = std::vector<_Type_>; \
2864+ using column_t = _Name_##Ids; \
2865+ using self_index_t = std::true_type; \
2866+ using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
2867+ _Name_##Ids(arrow::ChunkedArray const * column) \
2868+ : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
2869+ { \
2870+ } \
2871+ \
2872+ _Name_##Ids() = default ; \
2873+ _Name_##Ids(_Name_##Ids const & other) = default ; \
2874+ _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
2875+ gsl::span<const _Type_> inline getIds () const \
2876+ { \
2877+ return _Getter_##Ids (); \
2878+ } \
2879+ \
2880+ gsl::span<const _Type_> _Getter_##Ids() const \
2881+ { \
2882+ return *mColumnIterator ; \
2883+ } \
2884+ \
2885+ bool has_##_Getter_() const \
2886+ { \
2887+ return !(*mColumnIterator ).empty (); \
2888+ } \
2889+ \
2890+ template <typename T> \
2891+ auto _Getter_##_as() const \
2892+ { \
2893+ auto t = mBinding .get <T>(); \
2894+ if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
2895+ o2::soa::dereferenceWithWrongType (); \
2896+ } \
2897+ return getIterators<T>(); \
2898+ } \
2899+ \
2900+ template <typename T> \
2901+ auto getIterators () const \
2902+ { \
2903+ auto result = std::vector<typename T::unfiltered_iterator>(); \
2904+ for (auto & i : *mColumnIterator ) { \
2905+ result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
2906+ } \
2907+ return result; \
2908+ } \
2909+ \
2910+ template <typename T> \
2911+ auto _Getter_##_first_as() const \
2912+ { \
2913+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
2914+ } \
2915+ \
2916+ template <typename T> \
2917+ auto _Getter_##_last_as() const \
2918+ { \
2919+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
2920+ } \
2921+ \
2922+ bool setCurrentRaw (o2::soa::Binding current) \
2923+ { \
2924+ this ->mBinding = current; \
2925+ return true ; \
2926+ } \
2927+ o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
2928+ o2::soa::Binding mBinding ; \
29292929 };
29302930
29312931#define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_FULL (_Name_, _Getter_, _Type_, _Label_ ) DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE(_Name_, _Getter_, _Type_, _Label_, void )
0 commit comments