Skip to content

Commit f2979f5

Browse files
committed
address FIXMEs
1 parent 62d5f40 commit f2979f5

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

Framework/Core/include/Framework/ASoA.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4097,6 +4097,8 @@ class Filtered<Filtered<T>> : public FilteredBase<typename T::table_t>
40974097
/// First index will be used by process() as the grouping
40984098
template <typename L, typename D, typename O, typename Key, typename H, typename... Ts>
40994099
struct IndexTable : Table<L, D, O> {
4100+
static constexpr void isIndexTable()
4101+
{};
41004102
using self_t = IndexTable<L, D, O, Key, H, Ts...>;
41014103
using base_t = Table<L, D, O>;
41024104
using table_t = base_t;

Framework/Core/include/Framework/Concepts.h

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,20 @@ concept is_persistent_column = requires(C c) { c.isIteratableColumn(); };
4545

4646
/// 2. require self-index column
4747
template <typename C>
48-
concept is_self_index_column = not_void<typename std::decay_t<C>::self_index_t> && std::same_as<typename std::decay_t<C>::self_index_t, std::true_type>;
48+
concept is_self_index_column = requires(C c)
49+
{
50+
typename C::compatible_signature;
51+
//requires aod::is_aod_hash<typename C::compatible_signature>;
52+
typename C::self_index_t;
53+
requires std::same_as<typename C::self_index_t, std::true_type>;
54+
};
4955

50-
/// 3. require bidable index column
51-
/// FIXME: this should really rely on the struct's content instead
52-
struct Binding;
56+
/// 3. require bindable index column
5357
template <typename C>
54-
concept is_index_column = !is_self_index_column<C> && requires(C c, o2::soa::Binding b) {
55-
{ c.setCurrentRaw(b) } -> std::same_as<bool>;
56-
requires std::same_as<decltype(c.mBinding), o2::soa::Binding>;
58+
concept is_index_column = requires(C c)
59+
{
60+
typename C::binding_t;
61+
requires not_void<typename C::binding_t>;
5762
};
5863

5964
/// 4. require a column that can be created from an expression
@@ -99,12 +104,10 @@ template <typename T>
99104
concept has_parent_t = not_void<typename T::parent_t>;
100105

101106
/// 2. require a MetadataTrait specialization/descendant
102-
/// FIXME: this should really rely on the struct's content instead
103107
template <typename T>
104108
concept is_metadata_trait = requires(T t) { t.isMetadataTrait(); };
105109

106110
/// 3. require a TableMetadata depcialization/descendant
107-
/// FIXME: this should really rely on the struct's content instead
108111
template <typename T>
109112
concept is_metadata = requires(T t) { t.isTableMetadata(); };
110113

@@ -133,12 +136,11 @@ template <typename T>
133136
concept is_table_or_iterator = is_table<T> || is_iterator<T>;
134137

135138
/// 10. require soa::IndexTable
136-
/// FIXME: this should really rely on the struct's content instead
137-
template <typename L, typename D, typename O, typename Key, typename H, typename... Ts>
138-
struct IndexTable;
139-
140139
template <typename T>
141-
concept is_index_table = framework::specialization_of_template<o2::soa::IndexTable, T>;
140+
concept is_index_table = requires(T t)
141+
{
142+
t.isIndexTable();
143+
};
142144

143145
/// 11. require a type with a filtered policy
144146
template <typename T>
@@ -194,7 +196,6 @@ concept with_ccdb_urls = requires(T t) {
194196
};
195197

196198
/// 5. require a type, whos metadata has base_table_t dependant type
197-
/// FIXME: this should really rely on the struct's content instead
198199
template <typename T>
199200
concept with_base_table = with_originals<T> && has_metadata<aod::MetadataTrait<o2::aod::Hash<T::originals[T::originals.size() - 1].desc_hash>>> && requires {
200201
typename aod::MetadataTrait<o2::aod::Hash<T::originals[T::originals.size() - 1].desc_hash>>::metadata::base_table_t;

0 commit comments

Comments
 (0)