Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions 31 Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -1382,11 +1382,28 @@ using JoinBase = decltype(join(std::declval<Ts>()...));
template <typename T1, typename T2>
using ConcatBase = decltype(concat(std::declval<T1>(), std::declval<T2>()));

template <typename T1, typename T2>
constexpr auto is_binding_compatible_v()
template <typename B, typename E>
struct EquivalentIndex {
constexpr static bool value = false;
};

template <typename B, typename E>
constexpr bool is_index_equivalent_v = EquivalentIndex<B, E>::value;

template <typename T, typename... Os>
constexpr bool are_bindings_compatible_v(framework::pack<Os...>&&)
{
if constexpr (is_type_with_originals_v<T>) {
return (are_bindings_compatible_v<Os>(originals_pack_t<T>{}) || ...);
} else {
return ((std::is_same_v<T, Os> || is_index_equivalent_v<T, Os>) || ...);
}
}

template <typename T, typename B>
constexpr bool is_binding_compatible_v()
{
return framework::pack_size(
framework::intersected_pack_t<originals_pack_t<T1>, originals_pack_t<T2>>{}) > 0;
return are_bindings_compatible_v<T>(originals_pack_t<B>{});
}

} // namespace o2::soa
Expand All @@ -1397,6 +1414,12 @@ constexpr auto is_binding_compatible_v()
using metadata = std::void_t<T>; \
}

#define DECLARE_EQUIVALENT_FOR_INDEX(_Base_, _Equiv_) \
template <> \
struct o2::soa::EquivalentIndex<_Base_, _Equiv_> { \
constexpr static bool value = true; \
}

#define DECLARE_SOA_COLUMN_FULL(_Name_, _Getter_, _Type_, _Label_) \
struct _Name_ : o2::soa::Column<_Type_, _Name_> { \
static constexpr const char* mLabel = _Label_; \
Expand Down
5 changes: 5 additions & 0 deletions 5 Framework/Core/include/Framework/AnalysisDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -970,5 +970,10 @@ using CollisionMatchedRun3Sparse = soa::Join<Collisions, Run3MatchedSparse>::ite

} // namespace aod

namespace soa
{
DECLARE_EQUIVALENT_FOR_INDEX(aod::StoredMcParticles_000, aod::StoredMcParticles_001);
}

} // namespace o2
#endif // O2_FRAMEWORK_ANALYSISDATAMODEL_H_
Morty Proxy This is a proxified and sanitized view of the page, visit original site.