Skip to content

MuonReadoutGeometry+MuonGeoModel+MuonGeoModelTest: const cleanups.

Add const a number of places where it was missing. For example, a const method should generally not return a non-const pointer. In a few cases, where a non-const pointer was actually needed, we also added a non-const overload of a getter method.

Remove all use of mutable / const_cast.

Made all methods that actually changed the state of the classes non-const.

In a few cases, mutable members were used for values being returned by reference. Tried to avoid that where possible.

Mutable members were used for caching in some places. Retained these where it seemed to make sense, but converted to use CachedValue and friends. Rationalized a bit the use of caching in MdtReadoutElement.

As part of this, introduced MdtReadoutElement::geoInitDone(), which should be called after the geometry initialization is complete, to initialize caches. Also MuonStation::updateBlineFixedPointInAmdbLRS(), to apply the update here at a well-defined time. Both are now called from MuonChamber.

This all should remove a bunch of potential (actual?) thread-safety problems.

Tested with q220, q221, q222, q223, and q431; passes RunTier0Tests.

Merge request reports