Skip to content

Commit

Permalink
catch exception and keep going
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Nov 8, 2023
1 parent 689a052 commit cd0ea40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ConformalTracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,12 @@ void ConformalTracking::processEvent(LCEvent* evt) {
UKDTree nearestNeighbours = nullptr;

for (auto const& parameters : _stepParameters) {
runStep(kdClusters, nearestNeighbours, conformalTracks, collectionClusters, parameters);
try {
runStep(kdClusters, nearestNeighbours, conformalTracks, collectionClusters, parameters);
} catch (const TooManyTracksException &e) {
streamlog_out(ERROR) << "Too many tracks in step: " << parameters._step << " skipping further steps" << std::endl;
break;
}
streamlog_out(DEBUG9) << "STEP " << parameters._step << ": nr tracks = " << conformalTracks.size() << std::endl;
if (streamlog_level(DEBUG9)) {
for (auto const& confTrack : conformalTracks) {
Expand Down

0 comments on commit cd0ea40

Please sign in to comment.