Skip to content

Commit

Permalink
Merge pull request #63 from alibuild/alibot-cleanup-13679
Browse files Browse the repository at this point in the history
  • Loading branch information
aalkin authored Nov 12, 2024
2 parents 2f62a21 + df80729 commit 65855e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
17 changes: 11 additions & 6 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

#define DECLARE_SOA_ITERATOR_METADATA() \
template <typename IT> \
requires(o2::soa::is_iterator<IT>) struct MetadataTrait<IT> { \
requires(o2::soa::is_iterator<IT>) \
struct MetadataTrait<IT> { \
using metadata = typename MetadataTrait<typename IT::parent_t>::metadata; \
};

Expand Down Expand Up @@ -1048,11 +1049,15 @@ struct RowViewCore : public IP, C... {
void bind()
{
using namespace o2::soa;
auto f = framework::overloaded {
[this]<typename T>(T*) -> void requires is_persistent_column<T> { T::mColumnIterator.mCurrentPos = &this->mRowIndex; },
[this]<typename T>(T*) -> void requires is_dynamic_column<T> { bindDynamicColumn<T>(typename T::bindings_t{});},
auto f = framework::overloaded{
[this]<typename T>(T*) -> void
requires is_persistent_column<T>
{ T::mColumnIterator.mCurrentPos = &this->mRowIndex; },
[this]<typename T>(T*) -> void
requires is_dynamic_column<T>
{ bindDynamicColumn<T>(typename T::bindings_t{}); },
[this]<typename T>(T*) -> void {},
};
};
(f(static_cast<C*>(nullptr)), ...);
if constexpr (has_index_v) {
this->setIndices(this->getIndices());
Expand Down Expand Up @@ -1134,7 +1139,7 @@ template <typename T>
concept is_index_table = soa::is_specialization_origin_v<T, o2::soa::IndexTable>;

template <soa::is_table T>
requires (!soa::is_index_table<T>)
requires(!soa::is_index_table<T>)
static constexpr std::string getLabelFromType()
{
if constexpr (soa::is_type_with_originals_v<std::decay_t<T>>) {
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/AnalysisHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct WritingCursor<soa::Table<ORIGIN, PC...>> {
template <typename T>
static decltype(auto) extract(T const& arg)
{
if constexpr (requires (T t) { t.globalIndex(); }) {
if constexpr (requires(T t) { t.globalIndex(); }) {
return arg.globalIndex();
} else {
static_assert(!framework::has_type<T>(framework::pack<PC...>{}), "Argument type mismatch");
Expand Down
6 changes: 4 additions & 2 deletions Framework/Core/include/Framework/AnalysisTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ struct AnalysisDataProcessorBuilder {
}

template <typename O>
static void addOriginal(const char* name, bool value, std::vector<InputSpec>& inputs) requires soa::has_metadata<aod::MetadataTrait<std::decay_t<O>>>
static void addOriginal(const char* name, bool value, std::vector<InputSpec>& inputs)
requires soa::has_metadata<aod::MetadataTrait<std::decay_t<O>>>
{
using metadata = typename aod::MetadataTrait<std::decay_t<O>>::metadata;
std::vector<ConfigParamSpec> inputMetadata;
Expand Down Expand Up @@ -176,7 +177,8 @@ struct AnalysisDataProcessorBuilder {
}

template <typename T>
static auto extractTableFromRecord(InputRecord& record) requires soa::has_metadata<aod::MetadataTrait<T>>
static auto extractTableFromRecord(InputRecord& record)
requires soa::has_metadata<aod::MetadataTrait<T>>
{
auto table = record.get<TableConsumer>(aod::MetadataTrait<T>::metadata::tableLabel())->asArrowTable();
if (table->num_rows() == 0) {
Expand Down

0 comments on commit 65855e6

Please sign in to comment.