Skip to content

refactor: Refactoring of string parsing code for Gbts LUT and connection table#4934

Merged
kodiakhq[bot] merged 9 commits intoacts-project:mainfrom
jpreston-cern:refactoring
Jan 12, 2026
Merged

refactor: Refactoring of string parsing code for Gbts LUT and connection table#4934
kodiakhq[bot] merged 9 commits intoacts-project:mainfrom
jpreston-cern:refactoring

Conversation

@jpreston-cern
Copy link
Contributor

@jpreston-cern jpreston-cern commented Jan 6, 2026

This is the first in a series of PR's that aim to bring GBTS up to date with ACTS coding standards.

This PR focuses on refactoring the parsing code for the LUT so that its in its own file mimicking that of the connector file as well as moving it to the constructor of GbtsSeedingAlgorithm. It also includes some code clean up, as well as moving the seedFinder constructor to initialize as well. This gives some speed increase due to not parsing the LUT every event.

--- END COMMIT MESSAGE ---

This will affect the Athena API but a branch is already ready to submit to the canary

@timadye @andiwand

@github-actions github-actions bot added this to the next milestone Jan 6, 2026
@github-actions github-actions bot added Component - Core Affects the Core module Component - Examples Affects the Examples module Seeding Track Finding labels Jan 6, 2026
@jpreston-cern jpreston-cern changed the title Ref: Refactoring of string parsing code for LUT and connection table refactor: Refactoring of string parsing code for LUT and connection table Jan 6, 2026
@jpreston-cern jpreston-cern changed the title refactor: Refactoring of string parsing code for LUT and connection table refactor: Refactoring of string parsing code for Gbts LUT and connection table Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

📊: Physics performance monitoring for 2fff28b

Full contents

physmon summary

@jpreston-cern
Copy link
Contributor Author

jpreston-cern commented Jan 7, 2026

i have added all the changes suggested so far, the only thing i was thinking was that as the shared pointer of both geometry and Lutparser (name to be changed) is first defined as a member function of SeedFinderGbts and is then passed in per instance of the createSeed function, if there is a lot of multi threading of events, would that cause slow down because of the atomic reference count being high/ changing a lot?

@andiwand
Copy link
Contributor

andiwand commented Jan 8, 2026

i have added all the changes suggested so far, the only thing i was thinking was that as the shared pointer of both geometry and Lutparser (name to be changed) is first defined as a member function of SeedFinderGbts and is then passed in per instance of the createSeed function, if there is a lot of multi threading of events, would that cause slow down because of the atomic reference count being high/ changing a lot?

GbtsDataStorage is only created once per event, no? this also contains the GbtsLutParser right now which is held by the std::shared_ptr. in this case I would not worry about performance in any way. there might be a bit more indirection but without detailed profiling this should be not acted on

in case this happens for every seed you might be able to see some performance effects but still I would expect it to be extremely small

@jpreston-cern
Copy link
Contributor Author

jpreston-cern commented Jan 8, 2026

I have added the parsing function to the SeedFinderGbts class which stores the parsed information as a member veriable, this is then passed to each instance of GbtsDataStorage . i thought this made the most sense due to the seed finder creating the instances of the GbtsDataStorage and already having a copy of the config, but i can move it if needed

@jpreston-cern jpreston-cern marked this pull request as ready for review January 9, 2026 11:47
@andiwand
Copy link
Contributor

/ci-bridge-run

@sonarqubecloud
Copy link

@kodiakhq kodiakhq bot merged commit 8f3a7cf into acts-project:main Jan 12, 2026
44 checks passed
@acts-project-service acts-project-service added the Breaks Athena build This PR breaks the Athena build label Jan 12, 2026
: m_geo(geometry), m_config(config) {
GbtsDataStorage::GbtsDataStorage(std::shared_ptr<const GbtsGeometry> geometry,
const SeedFinderGbtsConfig& config,
const GbtsMLLookupTable& parseLutFile)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseLutFilemlLUT, since this is the table itself, no longer the parser. Similarly in the .hpp file.

Sorry I missed this before (but anyway wouldn't want to hold up the merge). Maybe this can be included in a future PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to other thing would be to pass this by value, i.e. GbtsMLLookupTable mlLUT so the user can use std::move and avoid the copy

@jpreston-cern jpreston-cern deleted the refactoring branch January 13, 2026 11:22
jpreston-cern added a commit to jpreston-cern/acts that referenced this pull request Jan 13, 2026
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Jan 16, 2026
@andiwand andiwand modified the milestones: next, v45.0.0 Jan 29, 2026
JustusRudolph pushed a commit to JustusRudolph/acts that referenced this pull request Feb 23, 2026
…ion table (acts-project#4934)

This is the first in a series of PR's that aim to bring GBTS up to date with ACTS coding standards. 

This PR focuses on refactoring the parsing code for the LUT so that its in its own file mimicking that of the connector file as well as moving it to the constructor of GbtsSeedingAlgorithm. It also includes some code clean up, as well as moving the seedFinder constructor to initialize as well. This gives some speed increase due to not parsing the LUT every event.
JustusRudolph pushed a commit to JustusRudolph/acts that referenced this pull request Feb 24, 2026
…ion table (acts-project#4934)

This is the first in a series of PR's that aim to bring GBTS up to date with ACTS coding standards. 

This PR focuses on refactoring the parsing code for the LUT so that its in its own file mimicking that of the connector file as well as moving it to the constructor of GbtsSeedingAlgorithm. It also includes some code clean up, as well as moving the seedFinder constructor to initialize as well. This gives some speed increase due to not parsing the LUT every event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaks Athena build This PR breaks the Athena build Component - Core Affects the Core module Component - Examples Affects the Examples module Fails Athena tests This PR causes a failure in the Athena tests Seeding Track Finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants