Skip to content

[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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tmadlener
Copy link
Contributor

@tmadlener tmadlener commented May 12, 2025

BEGINRELEASENOTES

  • Assign collection IDs when putting collections into the TES via Functional algorithms
  • Add a CollectionFromObjectSvc that makes it possible to retrieve a collection to which an object belongs

ENDRELEASENOTES

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 a podio::CollectionIDTable, which internally creates two vectors, and a mutex. We need this because CollectionIDTable::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.

@tmadlener tmadlener changed the title [Collid assignment [WIP] Assign collection IDs when putting collections into the TES May 12, 2025
@tmadlener tmadlener force-pushed the collid-assignment branch from b60b80c to 979422b Compare May 20, 2025 14:38
@tmadlener tmadlener changed the title [WIP] Assign collection IDs when putting collections into the TES [WIP] Add a service to allow retrieving collections to which an object belongs May 20, 2025
@tmadlener
Copy link
Contributor Author

As a follow up to more discussions that we had, I have now changed this such that the details of the ObjectID are no longer exposed, rather there is a new serivce (CollectionFromObjectSvc; name still to be refined potentially) that allows to get the collection corresponding to an object if that collection has been registered with the TES. This is effectively the same functionality as implemented in AIDASoft/podio#782.

Currently, it is necessary to explicitly instantiate that service (similar to the MetadataSvc). We might want to consider making it easily possible to just instantiate the service on the fly or adding it to the serivces that we automatically add in our ApplicationMgr wrapper.

public:
DeclareInterfaceID(ICollectionFromObjectSvc, 1, 0);

template <podio::ObjectType O>
Copy link
Contributor Author

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.

@tmadlener tmadlener force-pushed the collid-assignment branch from a3b7f82 to ea2146f Compare May 21, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant