@@ -2795,7 +2795,8 @@ consteval auto getIndexTargets()
27952795 o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
27962796 o2::soa::Binding mBinding ; \
27972797>>>>>>> d058635d65 (DPL Analysis: reduce amount of base types for columns)
2798- };
2798+ }
2799+ ;
27992800
28002801#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_)
28012802#define DECLARE_SOA_ARRAY_INDEX_COLUMN (_Name_, _Getter_ ) DECLARE_SOA_ARRAY_INDEX_COLUMN_FULL(_Name_, _Getter_, int32_t , _Name_##s, " " )
@@ -3006,77 +3007,77 @@ consteval auto getIndexTargets()
30063007#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL (_Name_, _Getter_, _Type_, _Label_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_COMPLETE(_Name_, _Getter_, _Type_, _Label_, void )
30073008#define DECLARE_SOA_SELF_SLICE_INDEX_COLUMN (_Name_, _Getter_ ) DECLARE_SOA_SELF_SLICE_INDEX_COLUMN_FULL(_Name_, _Getter_, int32_t , " _" #_Name_)
30083009// / SELF ARRAY
3009- #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
3010- struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
3011- static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
3012- static constexpr const char * mLabel = " fIndexArray" _Label_; \
3013- using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
3014- using type = std::vector<_Type_>; \
3015- using column_t = _Name_##Ids; \
3016- using self_index_t = std::true_type; \
3017- using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
3018- _Name_##Ids(arrow::ChunkedArray const * column) \
3019- : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
3020- { \
3021- } \
3022- \
3023- _Name_##Ids() = default ; \
3024- _Name_##Ids(_Name_##Ids const & other) = default ; \
3025- _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
3026- gsl::span<const _Type_> inline getIds () const \
3027- { \
3028- return _Getter_##Ids (); \
3029- } \
3030- \
3031- gsl::span<const _Type_> _Getter_##Ids() const \
3032- { \
3033- return *mColumnIterator ; \
3034- } \
3035- \
3036- bool has_##_Getter_() const \
3037- { \
3038- return !(*mColumnIterator ).empty (); \
3039- } \
3040- \
3041- template <typename T> \
3042- auto _Getter_##_as() const \
3043- { \
3044- auto t = mBinding .get <T>(); \
3045- if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
3046- o2::soa::dereferenceWithWrongType (#_Getter_, " self" ); \
3047- } \
3048- return getIterators<T>(); \
3049- } \
3050- \
3051- template <typename T> \
3052- auto getIterators () const \
3053- { \
3054- auto result = std::vector<typename T::unfiltered_iterator>(); \
3055- for (auto & i : *mColumnIterator ) { \
3056- result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
3057- } \
3058- return result; \
3059- } \
3060- \
3061- template <typename T> \
3062- auto _Getter_##_first_as() const \
3063- { \
3064- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
3065- } \
3066- \
3067- template <typename T> \
3068- auto _Getter_##_last_as() const \
3069- { \
3070- return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
3071- } \
3072- \
3073- bool setCurrentRaw (o2::soa::Binding current) \
3074- { \
3075- this ->mBinding = current; \
3076- return true ; \
3077- } \
3078- o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
3079- o2::soa::Binding mBinding ; \
3010+ #define DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN_COMPLETE (_Name_, _Getter_, _Type_, _Label_, _IndexTarget_ ) \
3011+ struct _Name_ ##Ids : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids> { \
3012+ static_assert (std::is_integral_v<_Type_>, " Index type must be integral" ); \
3013+ static constexpr const char * mLabel = " fIndexArray" _Label_; \
3014+ using base = o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>; \
3015+ using type = std::vector<_Type_>; \
3016+ using column_t = _Name_##Ids; \
3017+ using self_index_t = std::true_type; \
3018+ using compatible_signature = std::conditional<aod::is_aod_hash<_IndexTarget_>, _IndexTarget_, void >; \
3019+ _Name_##Ids(arrow::ChunkedArray const * column) \
3020+ : o2::soa::PersistentColumn<std::vector<_Type_>, _Name_##Ids>(o2::soa::ColumnIterator<type>(column)) \
3021+ { \
3022+ } \
3023+ \
3024+ _Name_##Ids() = default ; \
3025+ _Name_##Ids(_Name_##Ids const & other) = default ; \
3026+ _Name_##Ids& operator =(_Name_##Ids const & other) = default ; \
3027+ gsl::span<const _Type_> inline getIds () const \
3028+ { \
3029+ return _Getter_##Ids (); \
3030+ } \
3031+ \
3032+ gsl::span<const _Type_> _Getter_##Ids() const \
3033+ { \
3034+ return *mColumnIterator ; \
3035+ } \
3036+ \
3037+ bool has_##_Getter_() const \
3038+ { \
3039+ return !(*mColumnIterator ).empty (); \
3040+ } \
3041+ \
3042+ template <typename T> \
3043+ auto _Getter_##_as() const \
3044+ { \
3045+ auto t = mBinding .get <T>(); \
3046+ if (O2_BUILTIN_UNLIKELY (t == nullptr )) { \
3047+ o2::soa::dereferenceWithWrongType (#_Getter_, " self" ); \
3048+ } \
3049+ return getIterators<T>(); \
3050+ } \
3051+ \
3052+ template <typename T> \
3053+ auto getIterators () const \
3054+ { \
3055+ auto result = std::vector<typename T::unfiltered_iterator>(); \
3056+ for (auto & i : *mColumnIterator ) { \
3057+ result.push_back (mBinding .get <T>()->rawIteratorAt (i)); \
3058+ } \
3059+ return result; \
3060+ } \
3061+ \
3062+ template <typename T> \
3063+ auto _Getter_##_first_as() const \
3064+ { \
3065+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator )[0 ]); \
3066+ } \
3067+ \
3068+ template <typename T> \
3069+ auto _Getter_##_last_as() const \
3070+ { \
3071+ return mBinding .get <T>()->rawIteratorAt ((*mColumnIterator ).back ()); \
3072+ } \
3073+ \
3074+ bool setCurrentRaw (o2::soa::Binding current) \
3075+ { \
3076+ this ->mBinding = current; \
3077+ return true ; \
3078+ } \
3079+ o2::soa::Binding getCurrentRaw () const { return mBinding ; } \
3080+ o2::soa::Binding mBinding ; \
30803081 };
30813082
30823083#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