Skip to content

Commit 03a26c8

Browse files
committed
propagate dangling edges context to data processing device
1 parent 9a47f41 commit 03a26c8

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

Framework/AnalysisSupport/src/AODReaderHelpers.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ struct Buildable {
7979

8080
} // namespace
8181

82-
AlgorithmSpec AODReaderHelpers::indexBuilderCallback(ConfigContext const& ctx)
82+
AlgorithmSpec AODReaderHelpers::indexBuilderCallback(ConfigContext const& /*ctx*/)
8383
{
84-
auto& ac = ctx.services().get<DanglingEdgesContext>();
85-
return AlgorithmSpec::InitCallback{[requested = ac.requestedIDXs](InitContext& /*ic*/) {
84+
return AlgorithmSpec::InitCallback{[](InitContext& ic) {
85+
auto requested = ic.services().get<DanglingEdgesContext>().requestedIDXs;
8686
std::vector<Buildable> buildables;
8787
for (auto& i : requested) {
8888
buildables.emplace_back(i);
@@ -181,10 +181,10 @@ struct Spawnable {
181181

182182
} // namespace
183183

184-
AlgorithmSpec AODReaderHelpers::aodSpawnerCallback(ConfigContext const& ctx)
184+
AlgorithmSpec AODReaderHelpers::aodSpawnerCallback(ConfigContext const& /*ctx*/)
185185
{
186-
auto& ac = ctx.services().get<DanglingEdgesContext>();
187-
return AlgorithmSpec::InitCallback{[requested = ac.spawnerInputs](InitContext& /*ic*/) {
186+
return AlgorithmSpec::InitCallback{[](InitContext& ic) {
187+
auto requested = ic.services().get<DanglingEdgesContext>().spawnerInputs;
188188
std::vector<Spawnable> spawnables;
189189
for (auto& i : requested) {
190190
spawnables.emplace_back(i);

Framework/AnalysisSupport/src/AODReaderHelpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace o2::framework::readers
2020

2121
struct AODReaderHelpers {
2222
static AlgorithmSpec rootFileReaderCallback();
23-
static AlgorithmSpec aodSpawnerCallback(ConfigContext const& ctx);
24-
static AlgorithmSpec indexBuilderCallback(ConfigContext const& ctx);
23+
static AlgorithmSpec aodSpawnerCallback(ConfigContext const& /*ctx*/);
24+
static AlgorithmSpec indexBuilderCallback(ConfigContext const& /*ctx*/);
2525
};
2626

2727
} // namespace o2::framework::readers

Framework/Core/src/runDataProcessing.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
#include <memory>
12+
#include "Framework/DanglingEdgesContext.h"
1213
#include "Framework/TopologyPolicyHelpers.h"
1314
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
1415
#include <stdexcept>
@@ -1016,6 +1017,7 @@ void doDefaultWorkflowTerminationHook()
10161017
}
10171018

10181019
int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
1020+
DanglingEdgesContext& danglingEdgesContext,
10191021
RunningWorkflowInfo const& runningWorkflow,
10201022
RunningDeviceRef ref,
10211023
DriverConfig const& driverConfig,
@@ -1078,6 +1080,7 @@ int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
10781080
&spec,
10791081
&quotaEvaluator,
10801082
&serviceRegistry,
1083+
&danglingEdgesContext,
10811084
&deviceState,
10821085
&deviceProxy,
10831086
&processingPolicies,
@@ -1101,6 +1104,7 @@ int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
11011104
serviceRef.registerService(ServiceRegistryHelpers::handleForService<RunningWorkflowInfo const>(&runningWorkflow));
11021105
serviceRef.registerService(ServiceRegistryHelpers::handleForService<DeviceContext>(deviceContext.get()));
11031106
serviceRef.registerService(ServiceRegistryHelpers::handleForService<DriverConfig const>(&driverConfig));
1107+
serviceRef.registerService(ServiceRegistryHelpers::handleForService<DanglingEdgesContext>(&danglingEdgesContext));
11041108

11051109
auto device = std::make_unique<DataProcessingDevice>(ref, serviceRegistry);
11061110

@@ -1953,6 +1957,7 @@ int runStateMachine(DataProcessorSpecs const& workflow,
19531957
if (runningWorkflow.devices[di].id == frameworkId) {
19541958
return doChild(driverInfo.argc, driverInfo.argv,
19551959
serviceRegistry,
1960+
driverInfo.configContext->services().get<DanglingEdgesContext>(),
19561961
runningWorkflow, ref,
19571962
driverConfig,
19581963
driverInfo.processingPolicies,

0 commit comments

Comments
 (0)