Skip to content

Commit 63e99ad

Browse files
authored
Merge pull request #146 from alibuild/alibot-cleanup-15613
2 parents 6b31c6e + 0269632 commit 63e99ad

4 files changed

Lines changed: 30 additions & 56 deletions

File tree

Framework/Core/include/Framework/ASoA.h

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ static consteval int getIndexPosToKey_impl()
230230
/// Base type for table metadata
231231
template <typename D, typename... Cs>
232232
struct TableMetadata {
233-
static constexpr void isTableMetadata()
234-
{};
233+
static constexpr void isTableMetadata() {};
235234
using columns = framework::pack<Cs...>;
236235
using persistent_columns_t = framework::selected_pack<soa::is_persistent_column_t, Cs...>;
237236
using external_index_columns_t = framework::selected_pack<soa::is_external_index_t, Cs...>;
@@ -263,17 +262,15 @@ struct TableMetadata {
263262

264263
template <typename D>
265264
struct MetadataTrait {
266-
static constexpr void isMetadataTrait()
267-
{};
265+
static constexpr void isMetadataTrait() {};
268266
using metadata = void;
269267
};
270268

271269
/// Special struc to map the string hash back to the string and wrap a string literal into the
272270
/// type signature
273271
template <uint32_t H>
274272
struct Hash {
275-
static constexpr void isHash()
276-
{};
273+
static constexpr void isHash() {};
277274
static constexpr uint32_t hash = H;
278275
static constexpr char const* const str{""};
279276
};
@@ -295,8 +292,7 @@ consteval auto filterForKey()
295292
#define O2HASH(_Str_) \
296293
template <> \
297294
struct Hash<_Str_ ""_h> { \
298-
static constexpr void isHash() \
299-
{}; \
295+
static constexpr void isHash() {}; \
300296
static constexpr uint32_t hash = _Str_ ""_h; \
301297
static constexpr char const* const str{_Str_}; \
302298
};
@@ -305,10 +301,8 @@ consteval auto filterForKey()
305301
#define O2ORIGIN(_Str_) \
306302
template <> \
307303
struct Hash<_Str_ ""_h> { \
308-
static constexpr void isHash() \
309-
{}; \
310-
static constexpr void isOriginHash() \
311-
{}; \
304+
static constexpr void isHash() {}; \
305+
static constexpr void isOriginHash() {}; \
312306
static constexpr header::DataOrigin origin{_Str_}; \
313307
static constexpr uint32_t hash = _Str_ ""_h; \
314308
static constexpr char const* const str{_Str_}; \
@@ -665,8 +659,7 @@ class ColumnIterator : ChunkingPolicy
665659

666660
template <typename T, typename INHERIT>
667661
struct Column {
668-
static constexpr void isIteratableColumn()
669-
{};
662+
static constexpr void isIteratableColumn() {};
670663

671664
using inherited_t = INHERIT;
672665
Column(ColumnIterator<T> const& it)
@@ -702,17 +695,15 @@ struct Column {
702695
/// method call.
703696
template <typename F, typename INHERIT>
704697
struct DynamicColumn {
705-
static constexpr void isDynamicColumn()
706-
{};
698+
static constexpr void isDynamicColumn() {};
707699
using inherited_t = INHERIT;
708700

709701
static constexpr const char* const& columnLabel() { return INHERIT::mLabel; }
710702
};
711703

712704
template <typename INHERIT>
713705
struct IndexColumn {
714-
static constexpr void isEnumeratingColumn()
715-
{};
706+
static constexpr void isEnumeratingColumn() {};
716707
using inherited_t = INHERIT;
717708
static constexpr const uint32_t hash = 0;
718709

@@ -721,8 +712,7 @@ struct IndexColumn {
721712

722713
template <typename INHERIT>
723714
struct MarkerColumn {
724-
static constexpr void isMarkingColumn()
725-
{};
715+
static constexpr void isMarkingColumn() {};
726716
using inherited_t = INHERIT;
727717
static constexpr const uint32_t hash = 0;
728718

@@ -832,8 +822,7 @@ struct IndexPolicyBase {
832822
};
833823

834824
struct RowViewSentinel {
835-
static constexpr void isRowViewSentinel()
836-
{};
825+
static constexpr void isRowViewSentinel() {};
837826
int64_t const index;
838827
};
839828

@@ -944,8 +933,7 @@ struct FilteredIndexPolicy : IndexPolicyBase {
944933
};
945934

946935
struct DefaultIndexPolicy : IndexPolicyBase {
947-
static constexpr void isDefaultIndexPolicy()
948-
{};
936+
static constexpr void isDefaultIndexPolicy() {};
949937
/// Needed to be able to copy the policy
950938
DefaultIndexPolicy() = default;
951939
DefaultIndexPolicy(DefaultIndexPolicy&&) = default;
@@ -1031,8 +1019,7 @@ struct ColumnDataHolder {
10311019
template <typename D, typename O, typename IP, typename... C>
10321020
struct TableIterator : IP, C... {
10331021
public:
1034-
static constexpr void isTableIterator()
1035-
{};
1022+
static constexpr void isTableIterator() {};
10361023
using self_t = TableIterator<D, O, IP, C...>;
10371024
using policy_t = IP;
10381025
using all_columns = framework::pack<C...>;
@@ -1409,8 +1396,7 @@ namespace o2::framework
14091396
{
14101397
/// tracks origin in bindingKey matcher to handle the correct arguments
14111398
struct PreslicePolicyBase {
1412-
static constexpr void isPreslicePolicy()
1413-
{};
1399+
static constexpr void isPreslicePolicy() {};
14141400
const std::string binding;
14151401
Entry bindingKey;
14161402

@@ -1434,8 +1420,7 @@ struct PreslicePolicyGeneral : public PreslicePolicyBase {
14341420

14351421
template <soa::is_table T, is_preslice_policy Policy, bool OPT = false>
14361422
struct PresliceBase : public Policy {
1437-
static constexpr void isPresliceContainer()
1438-
{};
1423+
static constexpr void isPresliceContainer() {};
14391424
constexpr static bool optional = OPT;
14401425
using target_t = T;
14411426
using policy_t = Policy;
@@ -1450,7 +1435,7 @@ struct PresliceBase : public Policy {
14501435
{
14511436
if constexpr (OPT) {
14521437
if (Policy::isMissing()) {
1453-
return {nullptr, {0,0}};
1438+
return {nullptr, {0, 0}};
14541439
}
14551440
}
14561441
return Policy::getSliceFor(value, input);
@@ -1489,8 +1474,7 @@ using PresliceOptional = PresliceBase<T, PreslicePolicySorted, true>;
14891474
///
14901475
/// preslices.perCol;
14911476
struct PresliceGroup {
1492-
static constexpr void isPresliceGroup()
1493-
{};
1477+
static constexpr void isPresliceGroup() {};
14941478
};
14951479
} // namespace o2::framework
14961480

@@ -1703,8 +1687,7 @@ template <aod::is_aod_hash L, aod::is_aod_hash D, aod::is_origin_hash O, typenam
17031687
class Table
17041688
{
17051689
public:
1706-
static constexpr void isSOATable()
1707-
{};
1690+
static constexpr void isSOATable() {};
17081691
static constexpr const auto ref = TableRef{L::hash, D::hash, O::hash, o2::aod::version(D::str)};
17091692
using self_t = Table<L, D, O, Ts...>;
17101693
using table_t = self_t;
@@ -1912,7 +1895,7 @@ class Table
19121895
using iterator_template = TableIteratorBase<IP, Parent, T...>;
19131896

19141897
template <typename IP, typename Parent>
1915-
using iterator_template_o = decltype([](){
1898+
using iterator_template_o = decltype([]() {
19161899
if constexpr (sizeof...(Ts) == 0) {
19171900
return iterator_template<IP, Parent>{};
19181901
} else {
@@ -3340,8 +3323,7 @@ namespace o2::soa
33403323
{
33413324
template <typename... Ts>
33423325
struct Join : Table<o2::aod::Hash<"JOIN"_h>, o2::aod::Hash<"JOIN/0"_h>, o2::aod::Hash<"JOIN"_h>, Ts...> {
3343-
static constexpr void isJoin()
3344-
{};
3326+
static constexpr void isJoin() {};
33453327
using base = Table<o2::aod::Hash<"JOIN"_h>, o2::aod::Hash<"JOIN/0"_h>, o2::aod::Hash<"JOIN"_h>, Ts...>;
33463328

33473329
Join(std::vector<ArrowTableRef>&& tables)
@@ -3503,8 +3485,7 @@ template <soa::is_table T>
35033485
class FilteredBase : public T
35043486
{
35053487
public:
3506-
static constexpr void isFilteredBase()
3507-
{};
3488+
static constexpr void isFilteredBase() {};
35083489
using self_t = FilteredBase<T>;
35093490
using table_t = typename T::table_t;
35103491
using T::originals;
@@ -4028,8 +4009,7 @@ class Filtered<Filtered<T>> : public FilteredBase<typename T::table_t>
40284009
/// First index will be used by process() as the grouping
40294010
template <typename L, typename D, typename O, typename Key, typename H, typename... Ts>
40304011
struct IndexTable : Table<L, D, O> {
4031-
static constexpr void isIndexTable()
4032-
{};
4012+
static constexpr void isIndexTable() {};
40334013
using self_t = IndexTable<L, D, O, Key, H, Ts...>;
40344014
using base_t = Table<L, D, O>;
40354015
using table_t = base_t;
@@ -4073,8 +4053,7 @@ struct IndexTable : Table<L, D, O> {
40734053

40744054
template <typename T, bool APPLY>
40754055
struct SmallGroupsBase : public Filtered<T> {
4076-
static constexpr void isSmallGroups()
4077-
{};
4056+
static constexpr void isSmallGroups() {};
40784057
static constexpr bool applyFilters = APPLY;
40794058

40804059
SmallGroupsBase(std::vector<ArrowTableRef>&& tables, is_a_selection auto selection)

Framework/Core/include/Framework/AnalysisHelpers.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,7 @@ struct Produces : WritingCursor<T> {
645645
///
646646
/// Notice the label MySetOfProduces is just a mnemonic and can be omitted.
647647
struct ProducesGroup {
648-
static constexpr void isProducesGroup()
649-
{};
648+
static constexpr void isProducesGroup() {};
650649
};
651650

652651
/// Helper template for table transformations

Framework/Core/include/Framework/Concepts.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,16 @@ concept is_persistent_column = requires(C c) { c.isIteratableColumn(); };
4646

4747
/// 2. require self-index column
4848
template <typename C>
49-
concept is_self_index_column = requires(C c)
50-
{
49+
concept is_self_index_column = requires(C c) {
5150
typename C::compatible_signature;
52-
//requires aod::is_aod_hash<typename C::compatible_signature>;
51+
// requires aod::is_aod_hash<typename C::compatible_signature>;
5352
typename C::self_index_t;
5453
requires std::same_as<typename C::self_index_t, std::true_type>;
5554
};
5655

5756
/// 3. require bindable index column
5857
template <typename C>
59-
concept is_index_column = requires(C c)
60-
{
58+
concept is_index_column = requires(C c) {
6159
typename C::binding_t;
6260
requires not_void<typename C::binding_t>;
6361
};
@@ -138,8 +136,7 @@ concept is_table_or_iterator = is_table<T> || is_iterator<T>;
138136

139137
/// 10. require soa::IndexTable
140138
template <typename T>
141-
concept is_index_table = requires(T t)
142-
{
139+
concept is_index_table = requires(T t) {
143140
t.isIndexTable();
144141
};
145142

Framework/Core/src/ASoA.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void canNotJoin(std::vector<std::shared_ptr<arrow::Table>> const& tables, std::s
9898
template <typename T>
9999
void IncompatibleRanges(std::vector<ArrowTableRef> const& tables, std::span<T> labels)
100100
{
101-
auto loc = std::ranges::adjacent_find(tables, [](auto const& l, auto const& r){ return l.range != r.range; });
101+
auto loc = std::ranges::adjacent_find(tables, [](auto const& l, auto const& r) { return l.range != r.range; });
102102
if (loc != std::ranges::cend(tables)) {
103103
auto pos = std::distance(tables.begin(), loc);
104104
auto next = loc + 1;
@@ -140,7 +140,7 @@ ArrowTableRef joinTablesImpl(std::ranges::input_range auto tables, std::span<T>
140140
o2::soa::ArrowTableRef ArrowHelpers::joinTables(std::vector<std::shared_ptr<arrow::Table>>&& tables)
141141
{
142142
std::vector<ArrowTableRef> refs;
143-
std::ranges::transform(tables, std::back_inserter(refs),[](auto const& table){ return ArrowTableRef{table}; });
143+
std::ranges::transform(tables, std::back_inserter(refs), [](auto const& table) { return ArrowTableRef{table}; });
144144
return joinTablesImpl(refs, std::span<const char* const>());
145145
}
146146

@@ -207,7 +207,6 @@ o2::soa::ArrowTableRef ArrowHelpers::concatTables(std::vector<o2::soa::ArrowTabl
207207
return {arrow::Table::Make(std::make_shared<arrow::Schema>(resultFields), columns)};
208208
}
209209

210-
211210
arrow::ChunkedArray* getIndexFromLabel(arrow::Table* table, std::string_view label)
212211
{
213212
// Take the exact-match common case first (string_view comparison checks length

0 commit comments

Comments
 (0)