Skip to content
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

Add reference to event to tracks #56

Merged
merged 5 commits into from
Jul 4, 2022
Merged

Conversation

lobis
Copy link
Member

@lobis lobis commented Jul 1, 2022

lobis Ok: 69

Related to rest-for-physics/framework#260.

Adds reference to the event on each track on event initialization. This way we can access event information (and thus metadata) from the tracks, allowing to get information about volume / process names for print. This would also allow to do things such as access parent track from inside the child track itself, which can simplify some analysis logic.

The way this is setup is that these references are initialized on event load, requiring a loop over all tracks. In principle the added overhead should be small but if we notice it's too big the logic could be improved. The reason this reference update logic is not inside the track getter for the event, its because it would make this method no longer const, which I think it should be.

@lobis lobis requested review from jgalan, juanangp and nkx111 July 1, 2022 11:21
@lobis lobis marked this pull request as ready for review July 1, 2022 11:21
@lobis lobis merged commit dd9dbba into master Jul 4, 2022
@lobis lobis deleted the lobis-trestrun-event-injection branch July 4, 2022 09: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.

2 participants