Skip to content

Commit

Permalink
Really undo unnecessary changes
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>
  • Loading branch information
tmadlener and jmcarcell authored Feb 28, 2025
1 parent 6674618 commit 8b7285f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions k4FWCore/components/Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ class Writer final : public Gaudi::Functional::Consumer<void(const EventContext&
debug() << "Taking ownership of collection " << coll << " from the IOSvc as it belongs to a Frame" << endmsg;
DataObject* storeCollection;
if (m_dataSvc->retrieveObject("/Event/" + coll, storeCollection).isFailure()) {
warning() << "Failed to retrieve collection " << coll << endmsg;
continue;
error() << "Failed to retrieve collection " << coll << endmsg;
return;
}
// We take ownership back from the store
if (m_dataSvc->unregisterObject(storeCollection).isFailure()) {
warning() << "Failed to unregister collection " << coll << endmsg;
continue;
error() << "Failed to unregister collection " << coll << endmsg;
return;
}
// We still have to delete the AnyDataWrapper to avoid a leak
const auto storePtr = dynamic_cast<AnyDataWrapper<std::unique_ptr<podio::CollectionBase>>*>(storeCollection);
Expand Down

0 comments on commit 8b7285f

Please sign in to comment.