Skip to content

Commit 5a30ceb

Browse files
mpucciochiarazampolli
authored andcommitted
Skip DF with 0 collisions (#2351)
1 parent 9b4adc7 commit 5a30ceb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

EventFiltering/selectBCRange.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ struct BCRangeSelector {
7474
if (cols.size() != fdecs.size()) {
7575
throw std::runtime_error("Collision table and CefpDecision do not have the same number of rows! ");
7676
}
77+
if (cols.size() == 0) {
78+
LOGF(warning, "No collisions found!");
79+
pc.outputs().snapshot({"PPF", "IFRAMES", 0, Lifetime::Timeframe}, res);
80+
return;
81+
}
7782

7883
// 1. loop over collisions
7984
auto filt = fdecs.begin();
@@ -149,7 +154,7 @@ struct BCRangeSelector {
149154
return a.first < b.first;
150155
});
151156
if (bcRanges.empty()) {
152-
LOGF(error, "No BCs selected! This should not happen! Adding a bogus BC range to avoid crashes.");
157+
LOGF(warning, "No BCs selected! This should not happen! Adding a bogus BC range to avoid crashes.");
153158
bcRanges.push_back(std::make_pair(0, 0));
154159
}
155160
std::vector<std::pair<uint64_t, uint64_t>> bcRangesMerged(1, bcRanges[0]);

0 commit comments

Comments
 (0)