Skip to content

Commit d369614

Browse files
autumn-mckAutumn McKee
authored andcommitted
Gate skipping invalid timeframes behind env DPL_AOD_READER_SKIP_INVALID
1 parent 8dc3234 commit d369614

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Framework/AnalysisSupport/src/AODJAlienReaderHelpers.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "AODJAlienReaderHelpers.h"
1313
#include <charconv>
14+
#include <cstdlib>
1415
#include <memory>
1516
#include <ranges>
1617
#include <vector>
@@ -222,6 +223,7 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback(ConfigContext const
222223
static size_t totalSizeCompressed = 0;
223224
static uint64_t totalDFSent = 0;
224225
static uint64_t totalInvalidReadSkipped = 0;
226+
static bool skipInvalidReads = getenv("DPL_AOD_READER_SKIP_INVALID") && atoi(getenv("DPL_AOD_READER_SKIP_INVALID"));
225227

226228
// check if RuntimeLimit is reached
227229
if (!watchdog->update()) {
@@ -261,6 +263,9 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback(ConfigContext const
261263
try {
262264
treeRead = didir->readTree(outputs, dh, fcnt, ntf, totalSizeCompressed, totalSizeUncompressed, wasAOD);
263265
} catch (InvalidAODReadError const& e) {
266+
if (!skipInvalidReads) {
267+
throw;
268+
}
264269
skipInvalidRead(concrete.origin, e);
265270
return;
266271
}
@@ -285,6 +290,9 @@ AlgorithmSpec AODJAlienReaderHelpers::rootFileReaderCallback(ConfigContext const
285290
try {
286291
treeRead = didir->readTree(outputs, dh, fcnt, ntf, totalSizeCompressed, totalSizeUncompressed, wasAOD);
287292
} catch (InvalidAODReadError const& e) {
293+
if (!skipInvalidReads) {
294+
throw;
295+
}
288296
skipInvalidRead(concrete.origin, e);
289297
return;
290298
}

0 commit comments

Comments
 (0)