-
Notifications
You must be signed in to change notification settings - Fork 28
[WIP] Add a service to allow retrieving collections to which an object belongs #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b60b80c
to
979422b
Compare
As a follow up to more discussions that we had, I have now changed this such that the details of the Currently, it is necessary to explicitly instantiate that service (similar to the |
public: | ||
DeclareInterfaceID(ICollectionFromObjectSvc, 1, 0); | ||
|
||
template <podio::ObjectType O> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be changed to something that works with podio 1.3, as this is not part of that tag.
Either use the one read from file or place an empty one as soon as required. This makes it possible to check for collisions in id effectively the same way as done in the podio::Frame.
a3b7f82
to
ea2146f
Compare
BEGINRELEASENOTES
CollectionFromObjectSvc
that makes it possible to retrieve a collection to which an object belongsENDRELEASENOTES
This is the minimal solution for assigning collection ids on the fly when collections land in the TES (see also the discussion in #311). This implementation relies on currently available functionality from podio and has quite some potential for optimization (see below). However, that would require a new API in podio. The interface introduced in here should make it possible to hide that entirely, so that could be introduced at a later stage.The current implementation instantiates apodio::CollectionIDTable
, which internally creates two vectors, and a mutex. We need this becauseCollectionIDTable::add
is the only way to get to a collection ID at the moment via publicly available functionality from podio. We could envisage functionality for just obtaining the collection ID without having to go through the setup of data structures that are immediately destroyed again. Especially, since this instantiation happens for every collection that is added to the TES.