key4hep / k4LCIOReader

Generate EDM4hep collections from LCIO format data
Apache License 2.0
2 stars 11 forks source link

Delay cleanup #30

Closed andresailer closed 1 year ago

andresailer commented 1 year ago

BEGINRELEASENOTES

ENDRELEASENOTES

Did the previous implementation of getCollection just delete the collection when add_to_map was false, effectively doing nothing, or am I missing something?

tmadlener commented 1 year ago

I think the previous implementation (before #28) was always adding collections to the map. That meant that all collections that were never requested by Gaudi were leaked. add_to_map was introduced there to disambiguate between requests from Gaudi and "internal" requests that came from conversions that were required to resolve some relations.

Apparently I misunderstood that map (and the mechanism) because I figured the worst that happens when we don't add the internal conversions to it, was that we would convert them potentially several times. But that is obviously not the case, since now things are missing that were previously there.

Zehvogel commented 1 year ago

For me this causes the clicRec_edm4hep_input test of k4MarlinWrapper to fail

I don't have the local error message ready at the moment but its the same as here: https://github.com/key4hep/k4MarlinWrapper/actions/runs/4797974312/jobs/8663951199#step:6:2619

The interesting part is probably this?

[ctest] PodioOutput         FATAL  Standard std::exception is caught 
[ctest] PodioOutput         ERROR Trying to persistify untracked object
[ctest] EventLoopMgr        FATAL .executeEvent(): Standard std::exception thrown by PodioOutput
[ctest] EventLoopMgr        ERROR Trying to persistify untracked object

I guess your change did not cause but only exposed this problem, I will open a separate issue...