Skip to content

Commit 563a714

Browse files
committed
DPL: do not do the new early forwarding for some of the data
1 parent 397e019 commit 563a714

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,11 +1054,22 @@ void DataProcessingDevice::fillContext(DataProcessorContext& context, DeviceCont
10541054
}
10551055

10561056
auto decideEarlyForward = [&context, &deviceContext, &spec, this]() -> ForwardPolicy {
1057-
//ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_OLD_EARLY_FORWARD") ? ForwardPolicy::AtCompletionPolicySatisified : ForwardPolicy::AtInjection;
1058-
// Make the new policy optional until we handle some of the corner cases
1059-
// with custom policies which expect the early forward to happen only when
1060-
// all the data is available, like in the TPC case.
1061-
ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_NEW_EARLY_FORWARD") ? ForwardPolicy::AtInjection : ForwardPolicy::AtCompletionPolicySatisified;
1057+
ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_OLD_EARLY_FORWARD") ? ForwardPolicy::AtCompletionPolicySatisified : ForwardPolicy::AtInjection;
1058+
// FIXME: try again with the new policy by default.
1059+
//
1060+
// Make the new policy optional until we handle some of the corner cases
1061+
// with custom policies which expect the early forward to happen only when
1062+
// all the data is available, like in the TPC case.
1063+
// ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_NEW_EARLY_FORWARD") ? ForwardPolicy::AtInjection : ForwardPolicy::AtCompletionPolicySatisified;
1064+
for (auto& forward : spec.forwards) {
1065+
if (DataSpecUtils::match(forward.matcher, ConcreteDataTypeMatcher{"TPC", "DIGITSMCTR"}) ||
1066+
DataSpecUtils::match(forward.matcher, ConcreteDataTypeMatcher{"TPC", "CLNATIVEMCLBL"}) ||
1067+
DataSpecUtils::match(forward.matcher, ConcreteDataTypeMatcher{o2::header::gDataOriginTPC, "DIGITS"}) ||
1068+
DataSpecUtils::match(forward.matcher, ConcreteDataTypeMatcher{o2::header::gDataOriginTPC, "CLUSTERNATIVE"})) {
1069+
defaultEarlyForwardPolicy = ForwardPolicy::AtCompletionPolicySatisified;
1070+
break;
1071+
}
1072+
}
10621073

10631074
/// We must make sure there is no optional
10641075
/// if we want to optimize the forwarding

0 commit comments

Comments
 (0)