Skip to content

Commit c44343c

Browse files
ktfBarthelemy
authored andcommitted
Adapt to new DPL API for InputSpec (#109) (QC-132)
1 parent f16756b commit c44343c

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Framework/src/runAdvanced.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#include <Framework/CompletionPolicyHelpers.h>
3535
#include <Framework/DataSampling.h>
36+
#include <Framework/DataSpecUtils.h>
3637

3738
using namespace o2::framework;
3839

@@ -141,7 +142,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
141142
// a fix to make the topologies work when merged together
142143
localTopology.back().name += std::to_string(i);
143144
// temporary fix, which shouldn't be necessary when data sampling uses matchers
144-
localTopology.back().inputs[0].subSpec = i;
145+
DataSpecUtils::updateMatchingSubspec(localTopology.back().inputs[0], i);
145146

146147
specs.insert(std::end(specs), std::begin(localTopology), std::end(localTopology));
147148
}

Framework/test/testInfrastructureGenerator.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#include "QualityControl/InfrastructureGenerator.h"
1414

15+
#include <Framework/DataSpecUtils.h>
16+
1517
using namespace o2::quality_control::core;
1618
using namespace o2::framework;
1719

@@ -60,8 +62,10 @@ BOOST_AUTO_TEST_CASE(qc_factory_remote_test)
6062
auto mergerSkeletonTask = std::find_if(
6163
workflow.begin(), workflow.end(),
6264
[](const DataProcessorSpec& d) {
65+
auto concreteInput0 = DataSpecUtils::asConcreteDataMatcher(d.inputs[0]);
66+
auto concreteInput1 = DataSpecUtils::asConcreteDataMatcher(d.inputs[1]);
6367
return d.name == "skeletonTask-merger" &&
64-
d.inputs.size() == 2 && d.inputs[0].subSpec == 1 && d.inputs[1].subSpec == 2 &&
68+
d.inputs.size() == 2 && concreteInput0.subSpec == 1 && concreteInput1.subSpec == 2 &&
6569
d.outputs.size() == 1 && d.outputs[0].subSpec == 0;
6670
});
6771
BOOST_CHECK(mergerSkeletonTask != workflow.end());

0 commit comments

Comments
 (0)