Ptr's back to the same container - and mixing
The preamble to this issue is the same as for 1363 - that preamble is repeated below.
This request is that you find a solution that allows us to mix SimParticleCollections.
Here is the preamble:
In the mu2e class MCDataProducts/inc/SimParticleCollection.hh each SimParticle contains Ptrs to its mother and its children ( within the same data production ).
There are several complications with these Ptrs:
1) It requires redundant data members ( see issue 1361).
2) I need an ugly hack: I add the collection to the event, getting back an orphan handle, cast away constness on the collection received from the handle, and then set all of the Ptr's using the orphan handle.
3) I am pretty sure event mixing won't work, for the same reasons that required the hack 2).
#2 Updated by Christopher Green about 9 years ago
- Category set to Navigation
- Status changed from New to Resolved
- Assignee set to Christopher Green
- Target version set to 0.07.10
- % Done changed from 0 to 100
Mixing believed to be working for self-referential Ptrs with solution implemented with 8529e51. From the event loop (
getProductID<PROD>(e, instanceName)(see source:test/Integration/ProductIDGetter_module.cc) and then crate a
Ptr(ProductID const &id, key_type offset, ProductGetter const *getter)signature (use
e.productGetter()for the final argument).