Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkipEventException handling does not work? #158

Open
Zehvogel opened this issue Nov 3, 2023 · 0 comments
Open

SkipEventException handling does not work? #158

Zehvogel opened this issue Nov 3, 2023 · 0 comments

Comments

@Zehvogel
Copy link
Contributor

Zehvogel commented Nov 3, 2023

New issue for the leftover case from key4hep/k4FWCore#156, reproduction info is there

It looks like MyConformalTracking finds to many tracks and the event loop then terminates in event 914. With edm4hep output this causes the same crash as in the issue above, with lcio output the log looks like this:

[ MESSAGE "OverlayFalse"] No background file 
[ MESSAGE "OverlayFalse"] Starting at event: 0
=================== WARNING ===================
static method CellIDDecoder::setDefaultEncoding
does nothing anymore. Use the constructor to 
specify your encoding string !!
===============================================
[ MESSAGE0 "MyRecoMCTruthLinker"]  processEvent 913  - 0
[ MESSAGE "MyTrackChecker"]  ---- reference point of track fit x,y,z =  0 , 0 , 0
processEvent: event # 913
processEvent: event # 913
[ MESSAGE "EventNumber"]  ===== Run  :       0  Event:     913
Saving status: 1

----- Event 914 starts here -----

[ MESSAGE "OverlayFalse"] No background file 
[ MESSAGE "OverlayFalse"] Starting at event: 0
[ WARNING "MyConformalTracking"] WARNING: Going to create 19446 tracks 
[ WARNING "MyConformalTracking"] WARNING: Going to create 40712 tracks 
[ WARNING "MyConformalTracking"] WARNING: Going to create 69832 tracks 
[ WARNING "MyConformalTracking"] WARNING: Going to create 99304 tracks 
[ WARNING "MyConformalTracking"] WARNING: Going to create 120900 tracks 
[ ERROR "MyConformalTracking"] Too many tracks (120900 > 100000 are going to be created, tightening parameters
[ MESSAGE "MyConformalTracking"] caught too many tracks, tightening parameters
[ ERROR "MyConformalTracking"] Skipping event
MyConformalTrac...  ERROR Failed to store flag to skip event on Marlin marlin::SkipEventException
MyConformalTrac...  ERROR Maximum number of errors ( 'ErrorMax':1) reached.
EventLoopMgr      WARNING Execution of algorithm MyConformalTracking failed
[ WARNING "MyDDMarlinPandora_10ns"] Failed to extract track collection: SiTracks_Refitted, lcio::DataNotAvailableException: LCEventImpl::getCollection: collection not in event:SiTracks_Refitted
=================== WARNING ===================
static method CellIDDecoder::setDefaultEncoding
does nothing anymore. Use the constructor to 
specify your encoding string !!
===============================================
[ MESSAGE0 "MyRecoMCTruthLinker"]  processEvent 914  - 0
[ ERROR "MyTrackChecker"] Collection SiTracks_Refitted is unavailable
processEvent: event # 914
processEvent: event # 914
[ MESSAGE "EventNumber"]  ===== Run  :       0  Event:     914
EventLoopMgr        ERROR Error processing event loop.
EventLoopMgr        ERROR Terminating event processing loop due to errors
EventLoopMgr        ERROR Terminating event processing loop due to errors
[ MESSAGE4 "Output_DST"] 
[ MESSAGE4 "Output_DST"] LCIOOutputProcessor::end()  Output_DST: 915 events in 0 runs written to file  crash_test1_DST.slcio
[ MESSAGE4 "Output_DST"] 
[ MESSAGE4 "Output_REC"] 
[ MESSAGE4 "Output_REC"] LCIOOutputProcessor::end()  Output_REC: 915 events in 0 runs written to file  crash_test1_REC.slcio
[ MESSAGE4 "Output_REC"] 
[ MESSAGE "EventNumber"] Statusmonitor::end()  EventNumber processed 915 events in 0 runs 
LcfiplusProcessor::end()  JetClusteringAndRefiner processed 915 events in 0 runs 
LcfiplusProcessor::end()  VertexFinder processed 915 events in 0 runs 
[ MESSAGE "RenameCollection"]  processed 915 events in 0 runs 
[ MESSAGE "MyTrackChecker"]  end()  MyTrackChecker processed 914 events in 0 runs 
[ removed MyTrackChecker fit output ]
[ MESSAGE "MyClicEfficiencyCalculator"]  end()  MyClicEfficiencyCalculator processed 914 events in 0 runs 
[ MESSAGE "MyClicEfficiencyCalculator"] Reconstructable particle efficiency: 99.89 % (905/906)
[ MESSAGE "LumiCalReco"] Run MarlinLumiCalClusterer::end() Went through 915 events from 0 file(s)
[ MESSAGE "MyDDMarlinPandora_10ns"] DDPandoraPFANewProcessor - End
[ MESSAGE "MyConformalTracking"]  end()  MyConformalTracking processed 914 events in 0 runs 
[ MESSAGE "OuterEndcapPlanarDigiProcessor"]  end()  OuterEndcapPlanarDigiProcessor processed 915 events in 0 runs 
[ MESSAGE "OuterPlanarDigiProcessor"]  end()  OuterPlanarDigiProcessor processed 915 events in 0 runs 
[ MESSAGE "InnerEndcapPlanarDigiProcessor"]  end()  InnerEndcapPlanarDigiProcessor processed 915 events in 0 runs 
[ MESSAGE "InnerPlanarDigiProcessor"]  end()  InnerPlanarDigiProcessor processed 915 events in 0 runs 
[ MESSAGE "VXDEndcapDigitiser"]  end()  VXDEndcapDigitiser processed 915 events in 0 runs 
[ MESSAGE "VXDBarrelDigitiser"]  end()  VXDBarrelDigitiser processed 915 events in 0 runs 
ApplicationMgr      ERROR Application Manager Terminated with error code 3

It looks like the handling for this case does not work as intended looking at the line
MyConformalTrac... ERROR Failed to store flag to skip event on Marlin marlin::SkipEventException
produced by

catch (marlin::SkipEventException& e) {
// Store flag to prevent the rest of the event from processing
auto pStatus = std::make_unique<LCEventWrapperStatus>(false);
const StatusCode scStatus = eventSvc()->registerObject("/Event/LCEventStatus", pStatus.release());
if (scStatus.isFailure()) {
error() << "Failed to store flag to skip event on Marlin marlin::SkipEventException" << endmsg;
return scStatus;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant