Skip to content

Commit 2f62a21

Browse files
committed
fixup! DPL Analysis: introduce concepts and improve pack
1 parent fa5d7a4 commit 2f62a21

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Framework/Core/include/Framework/AnalysisHelpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ requires(!std::is_same_v<void, typename aod::MetadataTrait<T>::metadata>) struct
129129

130130
template <template <o2::framework::OriginEnc, typename...> class T, o2::framework::OriginEnc ORIGIN, typename... C>
131131
struct Produces<T<ORIGIN, C...>> : WritingCursor<typename soa::PackToTable<ORIGIN, typename T<ORIGIN, C...>::table_t::persistent_columns_t>::table> {
132+
using persistent_table_t = decltype([]() { if constexpr (soa::is_iterator<T<ORIGIN, C...>>) { return typename T<ORIGIN, C...>::parent_t{nullptr}; } else { return T<ORIGIN, C...>{nullptr}; } }());
132133
};
133134

134135
/// Use this to group together produces. Useful to separate them logically

Framework/Core/include/Framework/AnalysisManagers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,17 @@ template <typename TABLE>
247247
struct OutputManager<Produces<TABLE>> {
248248
static bool appendOutput(std::vector<OutputSpec>& outputs, Produces<TABLE>& /*what*/, uint32_t)
249249
{
250-
outputs.emplace_back(OutputForTable<TABLE>::spec());
250+
outputs.emplace_back(OutputForTable<typename Produces<TABLE>::persistent_table_t>::spec());
251251
return true;
252252
}
253253
static bool prepare(ProcessingContext& context, Produces<TABLE>& what)
254254
{
255-
what.resetCursor(std::move(context.outputs().make<TableBuilder>(OutputForTable<TABLE>::ref())));
255+
what.resetCursor(std::move(context.outputs().make<TableBuilder>(OutputForTable<typename Produces<TABLE>::persistent_table_t>::ref())));
256256
return true;
257257
}
258258
static bool finalize(ProcessingContext&, Produces<TABLE>& what)
259259
{
260-
what.setLabel(o2::aod::MetadataTrait<TABLE>::metadata::tableLabel());
260+
what.setLabel(o2::aod::MetadataTrait<typename Produces<TABLE>::persistent_table_t>::metadata::tableLabel());
261261
what.release();
262262
return true;
263263
}

0 commit comments

Comments
 (0)