Skip to content

Commit ab31e11

Browse files
committed
DPL: mechanical change to the new PartsRange API
1 parent fda4f94 commit ab31e11

7 files changed

Lines changed: 13 additions & 15 deletions

File tree

Detectors/TOF/workflow/src/CompressedAnalysisTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void CompressedAnalysisTask::run(ProcessingContext& pc)
8282
}
8383

8484
/** loop over input parts **/
85-
for (auto const& ref : iit) {
85+
for (auto const& ref : iit.parts()) {
8686

8787
const auto* headerIn = DataRefUtils::getHeader<o2::header::DataHeader*>(ref);
8888
auto payloadIn = ref.payload;

Detectors/TOF/workflow/src/CompressedInspectorTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void CompressedInspectorTask<RDH>::run(ProcessingContext& pc)
100100
}
101101

102102
/** loop over input parts **/
103-
for (auto const& ref : iit) {
103+
for (auto const& ref : iit.parts()) {
104104

105105
const auto* headerIn = DataRefUtils::getHeader<o2::header::DataHeader*>(ref);
106106
auto payloadIn = ref.payload;

Framework/Core/src/ExternalFairMQDeviceProxy.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,7 @@ DataProcessorSpec specifyFairMQDeviceOutputProxy(char const* name,
10281028

10291029
return adaptStateless([lastDataProcessingHeader](InputRecord& inputs) {
10301030
for (auto it = inputs.begin(); it != inputs.end(); it++) {
1031-
for (auto indices = it.initialIndices(); indices != it.endIndices(); indices = it.nextIndices(indices)) {
1032-
auto part = it.getAtIndices(indices);
1031+
for (auto const& part : it.parts()) {
10331032
const auto* dph = o2::header::get<DataProcessingHeader*>(part.header);
10341033
if (dph) {
10351034
// FIXME: should we implement an assignment operator for DataProcessingHeader?
@@ -1164,8 +1163,7 @@ DataProcessorSpec specifyFairMQDeviceMultiOutputProxy(char const* name,
11641163
// as forward routes but we need to keep a copy of the last DataProcessingHeader
11651164
// for sending the EOS
11661165
for (auto it = inputs.begin(); it != inputs.end(); it++) {
1167-
for (auto indices = it.initialIndices(); indices != it.endIndices(); indices = it.nextIndices(indices)) {
1168-
auto part = it.getAtIndices(indices);
1166+
for (auto const& part : it.parts()) {
11691167
const auto* dph = o2::header::get<DataProcessingHeader*>(part.header);
11701168
if (dph) {
11711169
// FIXME: should we implement an assignment operator for DataProcessingHeader?

Framework/Core/test/test_DataAllocator.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ DataProcessorSpec getSinkSpec()
220220
dumpStack(dh);
221221

222222
if ((*iit).spec->binding == "inputMP") {
223-
LOG(info) << "inputMP with " << iit.size() << " part(s)";
223+
LOG(info) << "inputMP with " << iit.parts().size() << " part(s)";
224224
int nPart = 0;
225-
for (auto const& ref : iit) {
225+
for (auto const& ref : iit.parts()) {
226226
LOG(info) << "accessing part " << nPart++ << " of input slot 'inputMP':"
227227
<< pc.inputs().get<int>(ref);
228228
ASSERT_ERROR(pc.inputs().get<int>(ref) == nPart * 10);
@@ -407,8 +407,8 @@ DataProcessorSpec getSpectatorSinkSpec()
407407
<< " payload size " << dh->payloadSize;
408408

409409
if ((*iit).spec->binding == "inputMP") {
410-
LOG(info) << "inputMP with " << iit.size() << " part(s)";
411-
for (auto const& ref : iit) {
410+
LOG(info) << "inputMP with " << iit.parts().size() << " part(s)";
411+
for (auto const& ref : iit.parts()) {
412412
LOG(info) << "accessing part " << nPart << " of input slot 'inputMP':"
413413
<< pc.inputs().get<int>(ref);
414414
nPart++;

Framework/Core/test/test_InputRecord.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ TEST_CASE("TestInputRecord")
160160

161161
// the 2-level iterator to access inputs and their parts
162162
// all inputs have 1 part, we check the first input
163-
REQUIRE(record.begin().size() == 1);
163+
REQUIRE(record.begin().parts().size() == 1);
164164
// the end-instance of the inputs has no parts
165-
REQUIRE(record.end().size() == 0);
165+
REQUIRE(record.end().parts().size() == 0);
166166
// thus there is no element and begin == end
167-
REQUIRE(record.end().begin() == record.end().end());
167+
REQUIRE(record.end().parts().begin() == record.end().parts().end());
168168
}
169169

170170
// TODO:

Steer/DigitizerWorkflow/src/TPCDigitizerSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class TPCDPLDigitizerTask : public BaseDPLDigitizer
260260
}
261261

262262
for (auto it = pc.inputs().begin(), end = pc.inputs().end(); it != end; ++it) {
263-
for (auto const& inputref : it) {
263+
for (auto const& inputref : it.parts()) {
264264
if (inputref.spec->lifetime == o2::framework::Lifetime::Condition) { // process does not need conditions
265265
continue;
266266
}

Utilities/DataSampling/src/Dispatcher.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void Dispatcher::run(ProcessingContext& ctx)
137137
if (auto route = policy->match(inputMatcher); route != nullptr && policy->decide(firstPart)) {
138138
auto routeAsConcreteDataType = DataSpecUtils::asConcreteDataTypeMatcher(*route);
139139
auto dsheader = prepareDataSamplingHeader(*policy, *firstInputHeader);
140-
for (const auto& part : inputIt) {
140+
for (const auto& part : inputIt.parts()) {
141141
if (part.header != nullptr) {
142142
// We copy every header which is not DataHeader or DataProcessingHeader,
143143
// so that custom data-dependent headers are passed forward,

0 commit comments

Comments
 (0)