Skip to content

Commit

Permalink
Add a warning output for potential issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 10, 2024
1 parent ac84173 commit 4cd14b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion k4MarlinWrapper/src/components/MarlinProcessorWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,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()) {
Expand Down Expand Up @@ -275,6 +275,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());
Expand Down

0 comments on commit 4cd14b3

Please sign in to comment.