Make BTagging shallow copies work in EventLoop
Following !206 (merged) we have shallow copies working in the AthAnalysis
builds. This doesn't work in AnalysisBase
because we can't build ElementLink
s without first storing the containers we're linking to in TStore
. And we can't store the containers in TStore
because TStore
will by default take ownership of anything we put there. We don't want TStore
to do this, because everything is already managed with unique_ptr
.
We can, as it turns out, tell TStore
not to take ownership. Attila tells us that he hid this option somewhat, but I'm pretty sure we can get at it, if we inherit from TStore
and write a wrapper that calls the internal function where isOwner
is an option. Unfortunately it does involve a bit of hacking at TStore
, probably involving copying a few parts of at least one function.
On the bright side, I'm also pretty sure the function we need to "borrow" is a fairly simple one. I doubt we even need to handle the "non-dictionary" case.