Skip to content
Snippets Groups Projects

LArWheelCalculator: cleanup parameterization code

Merged Frank Winklmeier requested to merge fwinkl/athena:geoshapes2 into master
All threads resolved!

Instead of using a mutex in fill_sincos_parameterization, make the code thread-safe by profiting from the local static initialization guarantees of C++11.

The parameterizations for the inner/outer wheel are calculated (and cached) in two separate functions on first invocation. For each instance of LArWheelCalculator, the values then only need to be copied into the instance members. This also avoids the code duplication for the cached/non-cached case.

Other changes:

  • change from C arrays to std::array
  • fix the size of the arrays to LARWC_SINCOS_POLY+1=6 (the size was still set to 7, presumably from earlier versions)
  • enable thread-checker
Edited by Frank Winklmeier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading