Skip to content
Merged
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
3 changes: 1 addition & 2 deletions Framework/AnalysisSupport/src/AODReaderHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct Buildable {
std::stringstream iws(loc->defaultValue.get<std::string>());
records = IndexJSONHelpers::read(iws);

loc = std::find_if(spec.metadata.begin(), spec.metadata.end(), [](ConfigParamSpec const& cps){ return cps.name.compare("index-exclusive") == 0; });
loc = std::find_if(spec.metadata.begin(), spec.metadata.end(), [](ConfigParamSpec const& cps) { return cps.name.compare("index-exclusive") == 0; });
exclusive = loc->defaultValue.get<bool>();

for (auto const& r : records) {
Expand Down Expand Up @@ -75,7 +75,6 @@ struct Buildable {
version,
nullptr};
}

};

} // namespace
Expand Down
1 change: 0 additions & 1 deletion Framework/AnalysisSupport/src/AODReaderHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace o2::framework::readers
{


struct AODReaderHelpers {
static AlgorithmSpec rootFileReaderCallback();
static AlgorithmSpec aodSpawnerCallback(ConfigContext const& ctx);
Expand Down
5 changes: 3 additions & 2 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ using is_self_index_t = typename std::conditional_t<is_self_index_column<C>, std

namespace o2::aod
{
namespace {
namespace
{
template <typename Key, size_t N, std::array<bool, N> map>
static consteval int getIndexPosToKey_impl()
{
Expand All @@ -228,7 +229,7 @@ static consteval int getIndexPosToKey_impl()
return -1;
}
}
}
} // namespace

/// Base type for table metadata
template <typename D, typename... Cs>
Expand Down
6 changes: 4 additions & 2 deletions Framework/Core/include/Framework/AnalysisHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ inline constexpr auto getIndexMapping()
} else {
idx.emplace_back(o2::aod::label<ref>(), C::columnLabel(), getIndexKind<typename C::type>(), pos);
}
}.template operator()<refs[Is], typename framework::pack_element_t<Is, indices>>(), ...);
}(std::make_index_sequence<framework::pack_size(indices{})>());;
}.template operator()<refs[Is], typename framework::pack_element_t<Is, indices>>(),
...);
}(std::make_index_sequence<framework::pack_size(indices{})>());
;
return idx;
}

Expand Down
3 changes: 2 additions & 1 deletion Framework/Core/src/AnalysisHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#include "ExpressionJSONHelpers.h"
#include "IndexJSONHelpers.h"

namespace o2::soa {
namespace o2::soa
{
std::vector<framework::IndexColumnBuilder> IndexBuilder::makeBuilders(std::vector<std::shared_ptr<arrow::Table>>&& tables, std::vector<soa::IndexRecord> const& records)
{
std::vector<framework::IndexColumnBuilder> builders;
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/src/ArrowSupport.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
builder->outputs.clear();
// replace AlgorithmSpec
// FIXME: it should be made more generic, so it does not need replacement...
builder->algorithm = PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "IndexTableBuilder", ctx);//readers::AODReaderHelpers::indexBuilderCallback(ctx);
builder->algorithm = PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "IndexTableBuilder", ctx); // readers::AODReaderHelpers::indexBuilderCallback(ctx);
AnalysisSupportHelpers::addMissingOutputsToBuilder(ac.requestedIDXs, ac.requestedAODs, ac.requestedDYNs, *builder);
}

Expand Down
15 changes: 9 additions & 6 deletions Framework/Core/src/IndexJSONHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
#include <stack>
#include <iostream>

namespace o2::framework {
namespace {
namespace o2::framework
{
namespace
{
struct IndexRecordsReader : public rapidjson::BaseReaderHandler<rapidjson::UTF8<>, IndexRecordsReader> {
using Ch = rapidjson::UTF8<>::Ch;
using SizeType = rapidjson::SizeType;
Expand Down Expand Up @@ -179,7 +181,7 @@ struct IndexRecordsReader : public rapidjson::BaseReaderHandler<rapidjson::UTF8<
return false;
}
};
}
} // namespace

std::vector<o2::soa::IndexRecord> IndexJSONHelpers::read(std::istream& s)
{
Expand All @@ -195,7 +197,8 @@ std::vector<o2::soa::IndexRecord> IndexJSONHelpers::read(std::istream& s)
return irreader.records;
}

namespace {
namespace
{
void writeRecords(rapidjson::Writer<rapidjson::OStreamWrapper>& w, std::vector<o2::soa::IndexRecord>& records)
{
for (auto& r : records) {
Expand All @@ -211,7 +214,7 @@ void writeRecords(rapidjson::Writer<rapidjson::OStreamWrapper>& w, std::vector<o
w.EndObject();
}
}
}
} // namespace

void IndexJSONHelpers::write(std::ostream& o, std::vector<o2::soa::IndexRecord>& irs)
{
Expand All @@ -224,4 +227,4 @@ void IndexJSONHelpers::write(std::ostream& o, std::vector<o2::soa::IndexRecord>&
w.EndArray();
w.EndObject();
}
}
} // namespace o2::framework
4 changes: 2 additions & 2 deletions Framework/Core/src/WorkflowHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
"internal-dpl-aod-index-builder",
{},
{},
PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "IndexTableBuilder", ctx),//readers::AODReaderHelpers::indexBuilderCallback(ctx),
PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "IndexTableBuilder", ctx), // readers::AODReaderHelpers::indexBuilderCallback(ctx),
{}};
AnalysisSupportHelpers::addMissingOutputsToBuilder(ac.requestedIDXs, ac.requestedAODs, ac.requestedDYNs, indexBuilder);

Expand All @@ -435,7 +435,7 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
"internal-dpl-aod-spawner",
{},
{},
PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "ExtendedTableSpawner", ctx),//readers::AODReaderHelpers::aodSpawnerCallback(ctx),
PluginManager::loadAlgorithmFromPlugin("O2FrameworkOnDemandTablesSupport", "ExtendedTableSpawner", ctx), // readers::AODReaderHelpers::aodSpawnerCallback(ctx),
{}};
AnalysisSupportHelpers::addMissingOutputsToSpawner({}, ac.spawnerInputs, ac.requestedAODs, aodSpawner);

Expand Down
1 change: 0 additions & 1 deletion Framework/Core/test/test_IndexBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ TEST_CASE("AdvancedIndexTables")
}
}


TEST_CASE("IndexRecordsSerialization")
{
auto map = getIndexMapping<o2::aod::MetadataTrait<o2::aod::Hash<"Index1/0"_h>>::metadata>();
Expand Down