art-framework-suite / art

The implementation of the art physics event processing framework
Other
2 stars 7 forks source link

create Ptr to product #86

Closed knoepfel closed 2 years ago

knoepfel commented 3 years ago

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/19306 (FNAL account required) Originally created by @rlcee on 2018-03-07 15:06:59


The art:Ptr can only be used to point to an object inside a indexed container of T, so logically it contains the productID and an index. An example is a track might contain art::Ptr's to hits in a product which is a vector of hits. We have some use cases where we would like one product to point to another product, in total.
For example, the track collection product could contain a pointer to the hit collection, simply to say "this track collection was created from this hit collection" or to create a product which is a list of pointers to a logically associated, but diverse in type, set of products. So logically this new art::ProductPtr would contain a productID, be persistable, and dereference to T*. Another thought, which I have no idea is possible under the covers or reasonable, is to make art::Handle persistent.

knoepfel commented 3 years ago

Comment by @knoepfel on 2018-03-12 16:47:25


We will provide a persistable art::ProductPtr.

knoepfel commented 2 years ago

Implemented with commit https://github.com/art-framework-suite/canvas/commit/1ded8cfa7314d088df2727b58597d07b3b564528. Some tests remain to be done.