Skip to content

Commit

Permalink
DPL Analysis: avoid spurious message at the end of the processing
Browse files Browse the repository at this point in the history
This solves the issue with the dummy extra iteration which is not
needed and actually flagged as an error after 336eda1.

The current logic is nevertheless to be reviewed because it seems
to silently skip all the timeframes in a file if the first table cannot be
read.
  • Loading branch information
ktf committed Aug 15, 2023
1 parent 915a2c1 commit c6cfc86
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Framework/AnalysisSupport/src/AODJAlienReaderHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback()
outputs.make<std::string>(o2) = currentFilename;
}
}

first = false;
}
totalDFSent++;
Expand All @@ -287,6 +286,27 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback()
// save file number and time frame
*fileCounter = (fcnt - device.inputTimesliceId) / device.maxInputTimeslices;
*numTF = ntf;

// Check if the next timeframe is available or
// if there are more files to be processed. If not, simply exit.
fcnt = (*fileCounter * device.maxInputTimeslices) + device.inputTimesliceId;
ntf = *numTF + 1;
auto& firstRoute = requestedTables.front();
auto concrete = DataSpecUtils::asConcreteDataMatcher(firstRoute.matcher);
auto dh = header::DataHeader(concrete.description, concrete.origin, concrete.subSpec);
auto fileAndFolder = didir->getFileFolder(dh, fcnt, ntf);
if (!fileAndFolder.file) {
fcnt += 1;
ntf = 0;
if (didir->atEnd(fcnt)) {
LOGP(info, "No input files left to read for reader {}!", device.inputTimesliceId);
didir->closeInputFiles();
monitoring.flushBuffer();
control.endOfStream();
control.readyToQuit(QuitRequest::Me);
return;
}
}
});
})};

Expand Down

0 comments on commit c6cfc86

Please sign in to comment.