@@ -2821,7 +2821,8 @@ consteval auto getIndexTargets()
28212821 o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
28222822 o2::soa::Binding mBinding ; \
28232823>>>>>>> d058635d65 (DPL Analysis: reduce amount of base types for columns)
2824- };
2824+ }
2825+ ;
28252826
28262827#define DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL (_Name_, _Getter_, _Type_, _Table_, _Suffix_ ) DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL_CUSTOM(_Name_, _Getter_, _Type_, _Table_, #_Table_, _Suffix_)
28272828#define DECLARE_SOA_ARRAY_INDEX_COLUMN (_Name_, _Getter_ ) DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(_Name_, _Getter_, int32_t , _Name_##s, " " )
@@ -3032,77 +3033,77 @@ consteval auto getIndexTargets()
30323033#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL (_Name_, _Getter_, _Type_, _Label_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_COMPLETE(_Name_, _Getter_, _Type_, _Label_, void )
30333034#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN (_Name_, _Getter_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL(_Name_, _Getter_, int32_t , " _" #_Name_)
30343035// / SELF ARRAY
3035- #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
3036- struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
3037- static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
3038- static constexpr const char * mLabel = " fIndexArray" _Label_; \
3039- using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
3040- using type = std::vector<_Type_>; \
3041- using column_t = _Name_##Ids; \
3042- using self_index_t = std::true_type; \
3043- using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
3044- _Name_##Ids(arrow::ChunkedArray const * column) \
3045- : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
3046- { \
3047- } \
3048- \
3049- _Name_##Ids() = default ; \
3050- _Name_##Ids(_Name_##Ids const & other) = default ; \
3051- _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
3052- gsl::span<const _Type_> inline getIds () const \
3053- { \
3054- return _Getter_##Ids (); \
3055- } \
3056- \
3057- gsl::span<const _Type_> _Getter_##Ids() const \
3058- { \
3059- return *mColumnIterator ; \
3060- } \
3061- \
3062- bool has_##_Getter_() const \
3063- { \
3064- return !(*mColumnIterator ).empty (); \
3065- } \
3066- \
3067- template <typename T> \
3068- auto _Getter_##_as() const \
3069- { \
3070- auto t = mBinding .get <T>(); \
3071- if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
3072- o2::soa::dereferenceWithWrongType (#_Getter_, " self" ); \
3073- } \
3074- return getIterators<T>(); \
3075- } \
3076- \
3077- template <typename T> \
3078- auto getIterators () const \
3079- { \
3080- auto result = std::vector<typename T::unfiltered_iterator>(); \
3081- for (auto & i : *mColumnIterator ) { \
3082- result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
3083- } \
3084- return result; \
3085- } \
3086- \
3087- template <typename T> \
3088- auto _Getter_##_first_as() const \
3089- { \
3090- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
3091- } \
3092- \
3093- template <typename T> \
3094- auto _Getter_##_last_as() const \
3095- { \
3096- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
3097- } \
3098- \
3099- bool setCurrentRaw (o2::soa::Binding current) \
3100- { \
3101- this ->mBinding = current; \
3102- return true ; \
3103- } \
3104- o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
3105- o2::soa::Binding mBinding ; \
3036+ #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
3037+ struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
3038+ static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
3039+ static constexpr const char * mLabel = " fIndexArray" _Label_; \
3040+ using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
3041+ using type = std::vector<_Type_>; \
3042+ using column_t = _Name_##Ids; \
3043+ using self_index_t = std::true_type; \
3044+ using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
3045+ _Name_##Ids(arrow::ChunkedArray const * column) \
3046+ : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
3047+ { \
3048+ } \
3049+ \
3050+ _Name_##Ids() = default ; \
3051+ _Name_##Ids(_Name_##Ids const & other) = default ; \
3052+ _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
3053+ gsl::span<const _Type_> inline getIds () const \
3054+ { \
3055+ return _Getter_##Ids (); \
3056+ } \
3057+ \
3058+ gsl::span<const _Type_> _Getter_##Ids() const \
3059+ { \
3060+ return *mColumnIterator ; \
3061+ } \
3062+ \
3063+ bool has_##_Getter_() const \
3064+ { \
3065+ return !(*mColumnIterator ).empty (); \
3066+ } \
3067+ \
3068+ template <typename T> \
3069+ auto _Getter_##_as() const \
3070+ { \
3071+ auto t = mBinding .get <T>(); \
3072+ if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
3073+ o2::soa::dereferenceWithWrongType (#_Getter_, " self" ); \
3074+ } \
3075+ return getIterators<T>(); \
3076+ } \
3077+ \
3078+ template <typename T> \
3079+ auto getIterators () const \
3080+ { \
3081+ auto result = std::vector<typename T::unfiltered_iterator>(); \
3082+ for (auto & i : *mColumnIterator ) { \
3083+ result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
3084+ } \
3085+ return result; \
3086+ } \
3087+ \
3088+ template <typename T> \
3089+ auto _Getter_##_first_as() const \
3090+ { \
3091+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
3092+ } \
3093+ \
3094+ template <typename T> \
3095+ auto _Getter_##_last_as() const \
3096+ { \
3097+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
3098+ } \
3099+ \
3100+ bool setCurrentRaw (o2::soa::Binding current) \
3101+ { \
3102+ this ->mBinding = current; \
3103+ return true ; \
3104+ } \
3105+ o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
3106+ o2::soa::Binding mBinding ; \
31063107 };
31073108
31083109#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