From 6747c25f1e57aa2bcc8af232b312b8d40351e238 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:19:38 +0100 Subject: [PATCH] DPL: drop support for FairMQ versions without shallow copy --- .../include/Framework/CompletionPolicyHelpers.h | 3 +-- Framework/Core/src/CompletionPolicy.cxx | 4 ---- Framework/Core/src/CompletionPolicyHelpers.cxx | 4 ---- Framework/Core/src/DataProcessingDevice.cxx | 14 -------------- Framework/Core/src/DataRelayer.cxx | 10 ---------- 5 files changed, 1 insertion(+), 34 deletions(-) diff --git a/Framework/Core/include/Framework/CompletionPolicyHelpers.h b/Framework/Core/include/Framework/CompletionPolicyHelpers.h index aa336d040d30d..7f77e4a96f76f 100644 --- a/Framework/Core/include/Framework/CompletionPolicyHelpers.h +++ b/Framework/Core/include/Framework/CompletionPolicyHelpers.h @@ -44,10 +44,9 @@ struct CompletionPolicyHelpers { /// When any of the parts of the record have been received, consume them. static CompletionPolicy consumeWhenAny(const char* name, CompletionPolicy::Matcher matcher); -#if __has_include() /// When any of the parts which has arrived has a refcount of 1. static CompletionPolicy consumeWhenAnyZeroCount(const char* name, CompletionPolicy::Matcher matcher); -#endif + /// Default matcher applies for all devices static CompletionPolicy consumeWhenAny(CompletionPolicy::Matcher matcher = [](auto const&) -> bool { return true; }) { diff --git a/Framework/Core/src/CompletionPolicy.cxx b/Framework/Core/src/CompletionPolicy.cxx index ec8997e32c5db..a09028b9249f3 100644 --- a/Framework/Core/src/CompletionPolicy.cxx +++ b/Framework/Core/src/CompletionPolicy.cxx @@ -26,11 +26,7 @@ std::vector { return { CompletionPolicyHelpers::consumeWhenAllOrdered("internal-dpl-aod-writer"), -#if __has_include() CompletionPolicyHelpers::consumeWhenAnyZeroCount("internal-dpl-injected-dummy-sink", [](DeviceSpec const& s) { return s.name.find("internal-dpl-injected-dummy-sink") != std::string::npos; }), -#else - CompletionPolicyHelpers::consumeWhenAny("internal-dpl-injected-dummy-sink", [](DeviceSpec const& s) { return s.name.find("internal-dpl-injected-dummy-sink") != std::string::npos; }), -#endif CompletionPolicyHelpers::consumeWhenAll()}; } diff --git a/Framework/Core/src/CompletionPolicyHelpers.cxx b/Framework/Core/src/CompletionPolicyHelpers.cxx index e682f9a7c7dd6..67c726b7f4368 100644 --- a/Framework/Core/src/CompletionPolicyHelpers.cxx +++ b/Framework/Core/src/CompletionPolicyHelpers.cxx @@ -19,9 +19,7 @@ #include "Framework/TimingInfo.h" #include "DecongestionService.h" #include "Framework/Signpost.h" -#if __has_include() #include -#endif #include #include @@ -252,7 +250,6 @@ CompletionPolicy CompletionPolicyHelpers::consumeExistingWhenAny(const char* nam }}; } -#if __has_include() CompletionPolicy CompletionPolicyHelpers::consumeWhenAnyZeroCount(const char* name, CompletionPolicy::Matcher matcher) { auto callback = [](InputSpan const& inputs, std::vector const&, ServiceRegistryRef& ref) -> CompletionPolicy::CompletionOp { @@ -265,7 +262,6 @@ CompletionPolicy CompletionPolicyHelpers::consumeWhenAnyZeroCount(const char* na }; return CompletionPolicy{name, matcher, callback, false}; } -#endif CompletionPolicy CompletionPolicyHelpers::consumeWhenAny(const char* name, CompletionPolicy::Matcher matcher) { diff --git a/Framework/Core/src/DataProcessingDevice.cxx b/Framework/Core/src/DataProcessingDevice.cxx index 406e93aaae98e..40f1061e60332 100644 --- a/Framework/Core/src/DataProcessingDevice.cxx +++ b/Framework/Core/src/DataProcessingDevice.cxx @@ -59,9 +59,7 @@ #include #include #include -#if __has_include() #include -#endif #include #include #include @@ -1046,14 +1044,6 @@ void DataProcessingDevice::fillContext(DataProcessorContext& context, DeviceCont if (forwarded.matcher.lifetime != Lifetime::Condition) { onlyConditions = false; } -#if !__has_include() - if (strncmp(DataSpecUtils::asConcreteOrigin(forwarded.matcher).str, "AOD", 3) == 0) { - context.canForwardEarly = false; - overriddenEarlyForward = true; - LOG(detail) << "Cannot forward early because of AOD input: " << DataSpecUtils::describe(forwarded.matcher); - break; - } -#endif if (DataSpecUtils::partialMatch(forwarded.matcher, o2::header::DataDescription{"RAWDATA"}) && deviceContext.processingPolicies.earlyForward == EarlyForwardPolicy::NORAW) { context.canForwardEarly = false; overriddenEarlyForward = true; @@ -2058,14 +2048,10 @@ bool DataProcessingDevice::tryDispatchComputation(ServiceRegistryRef ref, std::v auto nofPartsGetter = [¤tSetOfInputs](size_t i) -> size_t { return currentSetOfInputs[i].getNumberOfPairs(); }; -#if __has_include() auto refCountGetter = [¤tSetOfInputs](size_t idx) -> int { auto& header = static_cast(*currentSetOfInputs[idx].header(0)); return header.GetRefCount(); }; -#else - std::function refCountGetter = nullptr; -#endif return InputSpan{getter, nofPartsGetter, refCountGetter, currentSetOfInputs.size()}; }; diff --git a/Framework/Core/src/DataRelayer.cxx b/Framework/Core/src/DataRelayer.cxx index 06e920112649e..df95aeda92a2b 100644 --- a/Framework/Core/src/DataRelayer.cxx +++ b/Framework/Core/src/DataRelayer.cxx @@ -47,9 +47,7 @@ #include #include #include -#if __has_include() #include -#endif #include #include #include @@ -215,14 +213,10 @@ DataRelayer::ActivityStats DataRelayer::processDanglingInputs(std::vector) auto refCountGetter = [&partial](size_t idx) -> int { auto& header = static_cast(*partial[idx].header(0)); return header.GetRefCount(); }; -#else - std::function refCountGetter = nullptr; -#endif InputSpan span{getter, nPartsGetter, refCountGetter, static_cast(partial.size())}; // Setup the input span @@ -781,14 +775,10 @@ void DataRelayer::getReadyToProcess(std::vector& comp auto nPartsGetter = [&partial](size_t idx) { return partial[idx].size(); }; -#if __has_include() auto refCountGetter = [&partial](size_t idx) -> int { auto& header = static_cast(*partial[idx].header(0)); return header.GetRefCount(); }; -#else - std::function refCountGetter = nullptr; -#endif InputSpan span{getter, nPartsGetter, refCountGetter, static_cast(partial.size())}; CompletionPolicy::CompletionOp action = mCompletionPolicy.callbackFull(span, mInputs, mContext);