Skip to content
Prev Previous commit
Next Next commit
Apply clang-format
  • Loading branch information
aalkin committed Sep 29, 2026
commit 918b5cc04138b2cca4091efd41329c8234170671
7 changes: 3 additions & 4 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -1450,10 +1450,9 @@ struct PresliceBase : public Policy {

PresliceBase(expressions::BindingNode index_)
: Policy{Entry(
o2::soa::getLabelFromTypeForKey<T, true>(std::string{index_.name}),
o2::soa::getMatcherFromTypeForKey<T, true>(std::string{index_.name}),
std::string{index_.name}
)}
o2::soa::getLabelFromTypeForKey<T, true>(std::string{index_.name}),
o2::soa::getMatcherFromTypeForKey<T, true>(std::string{index_.name}),
std::string{index_.name})}
{
}

Expand Down
10 changes: 6 additions & 4 deletions Framework/Core/include/Framework/AnalysisManagers.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ bool isSlicedTableInput(std::vector<InputSpec> const& inputs, header::DataOrigin
/// not effective in this specialization, warning for Preslice only
/// 3. table, no column - the intended case for PresliceOptional, a mistake for Preslice, warning for Preslice only
/// 4. table, column - slicing input is added
template<is_preslice T>
template <is_preslice T>
bool addSlicingInputs(T& preslice, std::vector<InputSpec>& inputs, header::DataOrigin const& newOrigin)
{
using target_t = typename T::target_t;
Expand Down Expand Up @@ -686,9 +686,11 @@ bool addSlicingInputs(T& preslice, std::vector<InputSpec>& inputs, header::DataO
template <is_preslice_group T>
bool addSlicingInputs(T&& presliceGroup, std::vector<InputSpec>& inputs, header::DataOrigin const& newOrigin)
{
homogeneous_apply_refs<true>([&inputs, &newOrigin](auto& preslice){
return addSlicingInputs(preslice, inputs, newOrigin);
}, presliceGroup);
homogeneous_apply_refs<true>(
[&inputs, &newOrigin](auto& preslice) {
return addSlicingInputs(preslice, inputs, newOrigin);
},
presliceGroup);
return true;
}

Expand Down
10 changes: 6 additions & 4 deletions Framework/Core/include/Framework/AnalysisTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct AnalysisDataProcessorBuilder {
template <soa::is_iterator G, soa::is_table... As>
static void addSlicingInputs(const char* name, bool value, std::vector<InputSpec>& inputs, header::DataOrigin&& newOrigin = header::DataOrigin{"AOD"})
{
([&name,&value,&inputs,newOrigin]() mutable {
([&name, &value, &inputs, newOrigin]() mutable {
using T = std::decay_t<As>;
addSlicingInput<G, T>(name, value, inputs, std::move(newOrigin));
}(),
Expand Down Expand Up @@ -636,9 +636,11 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
homogeneous_apply_refs_sized<numElements>([&newOrigin](auto& element) { return analysis_task_parsers::replaceOrigin(element, newOrigin); }, *task.get());

// add slicing inputs from Preslice declarations
homogeneous_apply_refs_sized<numElements>([&inputs, &newOrigin](auto& element){
return analysis_task_parsers::addSlicingInputs(element, inputs, newOrigin);
}, *task.get());
homogeneous_apply_refs_sized<numElements>(
[&inputs, &newOrigin](auto& element) {
return analysis_task_parsers::addSlicingInputs(element, inputs, newOrigin);
},
*task.get());

auto algo = AlgorithmSpec::InitCallback
{
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 @@ -14,7 +14,8 @@
#include "ExpressionJSONHelpers.h"
#include "IndexJSONHelpers.h"

namespace o2::framework {
namespace o2::framework
{
void updateInputInfos(std::vector<InputInfo>& iInfos, ConcreteDataMatcher&& matcher, uint32_t hash, int ai)
{
auto locate = std::ranges::find_if(iInfos, [&hash](auto const& info) { return info.hash == hash; });
Expand Down
4 changes: 2 additions & 2 deletions Framework/Core/src/AnalysisSupportHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ void AnalysisSupportHelpers::addMissingOutputsToSlicer(std::vector<InputSpec> co
}

std::vector<std::pair<std::string, DataProcessorSpec>> AnalysisSupportHelpers::makeSlicers(std::vector<InputSpec> const& requestedSLCs,
std::vector<DataProcessorSpec const*> const& providers,
std::vector<std::vector<InputSpec>>& slicerGroups)
std::vector<DataProcessorSpec const*> const& providers,
std::vector<std::vector<InputSpec>>& slicerGroups)
{
// find the device providing the sliced table, if there is none the table is read from file
auto providerFor = [&providers](InputSpec const& request) -> std::string {
Expand Down
9 changes: 3 additions & 6 deletions Framework/Core/src/ArrowTableSlicingCache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,11 @@ InputSpec inputForEntry(Entry const& entry, bool sorted)
o2::framework::ConfigParamSpec{fmt::format("slice-source:{}", entry.binding),
framework::VariantType::String,
fmt::format("{}/{}/{}/{}", entry.binding, origin.as<std::string>(), description.as<std::string>(), version),
{"\"\""}}
);
{"\"\""}});
result.metadata.emplace_back(
o2::framework::ConfigParamSpec{"slice-key", framework::VariantType::String, entry.key, {"\"\""}}
);
o2::framework::ConfigParamSpec{"slice-key", framework::VariantType::String, entry.key, {"\"\""}});
result.metadata.emplace_back(
o2::framework::ConfigParamSpec{"sorted", framework::VariantType::Bool, sorted, {"\"\""}}
);
o2::framework::ConfigParamSpec{"sorted", framework::VariantType::Bool, sorted, {"\"\""}});

return result;
}
Expand Down
2 changes: 0 additions & 2 deletions Framework/Core/test/test_AnalysisTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ struct KTask {
std::shared_ptr<int> someSharedInt;
};


// PresliceOptional ignores situations where the table is present, but does
// not have the requested column
struct LTask {
Expand Down Expand Up @@ -249,7 +248,6 @@ TEST_CASE("AdaptorCompilation")
REQUIRE(task2.inputs[9].binding == "Calos");
REQUIRE(task2.inputs[10].binding == "CaloTriggers");


auto task3 = adaptAnalysisTask<CTask>(*cfgc, TaskName{"test3"});
REQUIRE(task3.inputs.size() == 4); // 3 base + 1 slice
REQUIRE(task3.inputs[0].binding == "Tracks_Slice");
Expand Down
Loading