@@ -53,10 +53,9 @@ void accessingInvalidIndexFor(const char* getter);
5353void dereferenceWithWrongType (const char * getter, const char * target);
5454void missingFilterDeclaration (int hash, int ai);
5555void notBoundTable (const char * tableName);
56- void * extractCCDBPayload (char * payload, size_t size, TClass const * cl, const char * what);
56+ void * extractCCDBPayload (char * payload, size_t size, TClass const * cl, const char * what);
5757} // namespace o2::soa
5858
59-
6059namespace o2 ::soa
6160{
6261// / Generic identifier for a table type
@@ -2326,44 +2325,44 @@ consteval static std::string_view namespace_prefix()
23262325 }; \
23272326 [[maybe_unused]] static constexpr o2::framework::expressions::BindingNode _Getter_ { _Label_, _Name_::hash, o2::framework::expressions::selectArrowType<_Type_>() }
23282327
2329- #define DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, _Label_, _Getter_, _ConcreteType_, _CCDBQuery_ ) \
2330- struct _Name_ : o2::soa::Column<std::span<std::byte>, _Name_> { \
2331- static constexpr const char * mLabel = _Label_; \
2332- static constexpr const char * query = _CCDBQuery_; \
2333- static constexpr const uint32_t hash = crc32(namespace_prefix<_Name_>(), std::string_view{#_Getter_}); \
2334- using base = o2::soa::Column<std::span<std::byte>, _Name_>; \
2335- using type = std::span<std::byte>; \
2336- using column_t = _Name_; \
2337- _Name_ (arrow::ChunkedArray const * column) \
2338- : o2::soa::Column<std::span<std::byte>, _Name_>(o2::soa::ColumnIterator<std::span<std::byte>>(column)) \
2339- { \
2340- } \
2341- \
2342- _Name_ () = default ; \
2343- _Name_ (_Name_ const & other) = default ; \
2344- _Name_& operator =(_Name_ const & other) = default ; \
2345- \
2346- decltype (auto ) _Getter_() const \
2347- { \
2348- static std::byte* payload = nullptr ; \
2349- static _ConcreteType_* deserialised = nullptr ; \
2350- static TClass* c = TClass::GetClass (#_ConcreteType_); \
2351- auto span = *mColumnIterator ; \
2352- if (payload != (std::byte*)span.data ()) { \
2353- payload = (std::byte*)span.data (); \
2354- delete deserialised; \
2355- std::cout << " Payload " << (void *)span.data () << " " << span.size () << std::endl; \
2356- TBufferFile f (TBufferFile::EMode::kRead , span.size (), (char *)span.data (), kFALSE ); \
2357- deserialised = (_ConcreteType_*)soa::extractCCDBPayload ((char *)payload, span.size (), c, " ccdb_object" ); \
2358- } \
2359- return *deserialised; \
2360- } \
2361- \
2362- decltype (auto ) \
2363- get () const \
2364- { \
2365- return _Getter_ (); \
2366- } \
2328+ #define DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, _Label_, _Getter_, _ConcreteType_, _CCDBQuery_ ) \
2329+ struct _Name_ : o2::soa::Column<std::span<std::byte>, _Name_> { \
2330+ static constexpr const char * mLabel = _Label_; \
2331+ static constexpr const char * query = _CCDBQuery_; \
2332+ static constexpr const uint32_t hash = crc32(namespace_prefix<_Name_>(), std::string_view{#_Getter_}); \
2333+ using base = o2::soa::Column<std::span<std::byte>, _Name_>; \
2334+ using type = std::span<std::byte>; \
2335+ using column_t = _Name_; \
2336+ _Name_ (arrow::ChunkedArray const * column) \
2337+ : o2::soa::Column<std::span<std::byte>, _Name_>(o2::soa::ColumnIterator<std::span<std::byte>>(column)) \
2338+ { \
2339+ } \
2340+ \
2341+ _Name_ () = default ; \
2342+ _Name_ (_Name_ const & other) = default ; \
2343+ _Name_& operator =(_Name_ const & other) = default ; \
2344+ \
2345+ decltype (auto ) _Getter_() const \
2346+ { \
2347+ static std::byte* payload = nullptr ; \
2348+ static _ConcreteType_* deserialised = nullptr ; \
2349+ static TClass* c = TClass::GetClass (#_ConcreteType_); \
2350+ auto span = *mColumnIterator ; \
2351+ if (payload != (std::byte*)span.data ()) { \
2352+ payload = (std::byte*)span.data (); \
2353+ delete deserialised; \
2354+ std::cout << " Payload " << (void *)span.data () << " " << span.size () << std::endl; \
2355+ TBufferFile f (TBufferFile::EMode::kRead , span.size (), (char *)span.data (), kFALSE ); \
2356+ deserialised = (_ConcreteType_*)soa::extractCCDBPayload ((char *)payload, span.size (), c, " ccdb_object" ); \
2357+ } \
2358+ return *deserialised; \
2359+ } \
2360+ \
2361+ decltype (auto ) \
2362+ get () const \
2363+ { \
2364+ return _Getter_ (); \
2365+ } \
23672366 };
23682367
23692368#define DECLARE_SOA_CCDB_COLUMN (_Name_, _Getter_, _ConcreteType_, _CCDBQuery_ ) \
0 commit comments