key4hep / key4hep/k4FWCore

Discussion: Should collection IDs be assigned for collections in the TES?

Open
#311 3 comments 0 reactions 0 assignees View on GitHub
documentation question
Dominant language
C++
Stars
14
Forks
34
Avg merge
2d 23h
Merged PRs (30d)
6

Description

Currently collections only have a valid (i.e. `!= -1` or `ffffffff`) collection ID if they are read from file, as it gets assigned only when we put collections into the Frame for writing. This can lead to issues when trying to use the collectionIDs as unique identifiers for collections (e.g. https://github.com/key4hep/k4MarlinWrapper/issues/235).

It should be fairly straight forward to assign collection IDs when collections are put into the TES, since the name for persisting to file is also the name we use for identifying it in the TES. IT might be necessary to expose some API call to provide the hash from the name.

The question is: **Do we want / need to assign valid collection IDs when adding collections to the TES?** Currently, we do not document whether this is defined or not, so at the least we should document expectations around this.

Contributor guide

Open the contributing guide

Research direction

Start by examining how collections are added to the TES and how collection IDs are assigned when collections enter the Frame for writing. Resolve whether TES collections should receive valid IDs, including whether an API is needed for name hashing. Done means the behavior is decided and the expectations are documented, or the agreed assignment behavior is implemented and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.