@@ -2370,10 +2370,15 @@ consteval static std::string_view namespace_prefix()
23702370 }; \
23712371 [[maybe_unused]] static constexpr o2::framework::expressions::BindingNode _Getter_ { _Label_, _Name_::hash, o2::framework::expressions::selectArrowType<_Type_>() }
23722372
2373- #define DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, _Label_, _Getter_, _ConcreteType_, _CCDBQuery_, ...) \
2373+ #define DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, _Label_, _Getter_, _ConcreteType_, _CCDBQuery_, _RunDependent_, ...) \
23742374 struct _Name_ : o2::soa::Column<int64_t [3 ], _Name_> { \
23752375 static constexpr const char * mLabel = _Label_; \
2376- static constexpr const char * query = _CCDBQuery_; \
2376+ static constexpr const char * query = _CCDBQuery_; \
2377+ /* How the object is keyed in CCDB: 0 queries by timestamp alone, 1 additionally sends */ \
2378+ /* the run number as "runNumber" metadata (o2::ccdb run-dependent objects), 2 uses the */ \
2379+ /* run number in place of the timestamp. A non-zero value needs the column's table to */ \
2380+ /* be uniform in the run number, since that is where the run comes from. */ \
2381+ static constexpr int run_dependent = _RunDependent_; \
23772382 static constexpr const uint32_t hash = crc32(namespace_prefix<_Name_>(), std::string_view{#_Getter_}); \
23782383 static constexpr bool needs_ptr_rec = true ; \
23792384 /* Post-deserialisation fixup for objects which are not usable straight out of the ROOT */ \
@@ -2438,8 +2443,8 @@ consteval static std::string_view namespace_prefix()
24382443 for DECLARE_SOA_CCDB_COLUMN_FULL when it needs finalising first — a FlatObject whose
24392444 pointers must be rectified, say. Its finaliser is the trailing argument, so commas in a
24402445 lambda body are absorbed by __VA_ARGS__. */
2441- #define DECLARE_SOA_CCDB_COLUMN (_Name_, _Getter_, _ConcreteType_, _CCDBQuery_ ) \
2442- DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, " f" #_Name_, _Getter_, _ConcreteType_, _CCDBQuery_, \
2446+ #define DECLARE_SOA_CCDB_COLUMN (_Name_, _Getter_, _ConcreteType_, _CCDBQuery_ ) \
2447+ DECLARE_SOA_CCDB_COLUMN_FULL (_Name_, " f" #_Name_, _Getter_, _ConcreteType_, _CCDBQuery_, 0 , \
24432448 [](_ConcreteType_* ccdbObject) { return ccdbObject; })
24442449
24452450#define DECLARE_SOA_COLUMN (_Name_, _Getter_, _Type_ ) \
@@ -3355,6 +3360,9 @@ consteval auto getIndexTargets()
33553360 static constexpr const auto ccdb_bindings = []<typename ... Cs>(framework::pack<Cs...>) { \
33563361 return std::array<std::string_view, sizeof ...(Cs)>{Cs::mLabel ...}; \
33573362 }(framework::pack<__VA_ARGS__>{}); \
3363+ static constexpr const auto ccdb_run_dependent = []<typename ... Cs>(framework::pack<Cs...>) { \
3364+ return std::array<int , sizeof ...(Cs)>{Cs::run_dependent...}; \
3365+ }(framework::pack<__VA_ARGS__>{}); \
33583366 /* The uniformity column may live in a table other than the timestamp source (the run */ \
33593367 /* number is on aod::BCs, the timestamp on aod::Timestamps). Both are handed to the */ \
33603368 /* fetcher, which reads them positionally — sound because the two are row-aligned. */ \
0 commit comments