Skip to content

MagneticFieldSvc - Cache field current

Christopher Rob Jones requested to merge MagneticFieldSvc-CacheFieldCurrent into master

Currently the field service computes from scratch the signed current each time signedRelativeCurrent() is called. The value though cannot change outside of conditions updates, so instead cache the value together with the polarity when this happens, and just return the cached value. This call is used deep in the DeRichHPD to determine if the field is ON/OFF and thus if MDCS corrections should be used. It currently accounts for O(5%) of the time DeRichHPD::detectionPoint takes.

Merge request reports