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

Make sure that reading of LCIO events stops early enough #210

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a warning output for potential issues
tmadlener committed Dec 15, 2024
commit f27b41e0d53d57f0297d335a0813e19d446ebeca
5 changes: 4 additions & 1 deletion k4MarlinWrapper/src/components/MarlinProcessorWrapper.cpp
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ StatusCode MarlinProcessorWrapper::initialize() {
}

StatusCode MarlinProcessorWrapper::execute(const EventContext&) const {
// Get flag to know if there was an underlying LCEvent
// Get flag to check if this processor should be skipped or not
DataObject* pStatus = nullptr;
StatusCode scStatus = eventSvc()->retrieveObject("/Event/LCEventStatus", pStatus);
if (scStatus.isSuccess()) {
@@ -279,6 +279,9 @@ StatusCode MarlinProcessorWrapper::execute(const EventContext&) const {

// Handle exceptions that may come from Marlin
catch (marlin::SkipEventException& e) {
warning() << "Caught marlin::SkipEventException. Skipping the wrapped Processors, but Gaudi Algorithms will still "
"execute and may fail"
<< endmsg;
// Store flag to prevent the rest of the event from processing
auto upStatus = std::make_unique<LCEventWrapperStatus>(false);
const StatusCode code = eventSvc()->registerObject("/Event/LCEventStatus", upStatus.release());