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

TDatabasePDG is not thread safe #417

Open
c-dilks opened this issue Dec 29, 2022 · 2 comments
Open

TDatabasePDG is not thread safe #417

c-dilks opened this issue Dec 29, 2022 · 2 comments
Labels
bug Something isn't working part:services Core services and functionality

Comments

@c-dilks
Copy link
Member

c-dilks commented Dec 29, 2022

Environment: (where does this bug occur, have you tried other environments)

  • Which branch (often main for latest released): main
  • Which version (or HEAD for the most recent on git):
  • Any specific OS or system where the issue occurs?
  • Any special versions of ROOT or Geant4?

Steps to reproduce: (give a step by step account of how to trigger the bug)

See root-project/root#11580

We use this in the following:

src/algorithms/tracking/TruthTrackSeeding.h
src/algorithms/tracking/TruthTrackSeeding.cc
src/algorithms/tracking/TrackParamTruthInit.h
src/algorithms/tracking/TrackParamTruthInit.cc
src/algorithms/pid/IrtCherenkovParticleID.h    (in dev branch `irt-algo`)
src/algorithms/pid/IrtCherenkovParticleID.cc   (in dev branch `irt-algo`)

Thanks to @wdconinc for pointing this out in #416.

Potential Solutions

  • Use a mutex
  • Contribute a PR to root to fix the issue there for all
  • Port Juggler's particle service
@wdconinc
Copy link
Contributor

Port Juggler's particle service

I wouldn't necessarily simply port the service from juggler: it was quick to replicate the particle table, but would have been better to use an external reference for that, in particular if more info will be needed in the future.

I'd probably suggest a service that initializes its table based on TDatabasePDG and then continues to serve it in a thread safe way.

@DraTeots
Copy link
Contributor

Agree with @wdconinc

@DraTeots DraTeots added part:services Core services and functionality bug Something isn't working labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working part:services Core services and functionality
Projects
None yet
Development

No branches or pull requests

3 participants