Skip to content

Draft: GeoModelSvc: make MaterialManager methods non-const

Frank Winklmeier requested to merge fwinkl/athena:geomodelsvc into master

This is an attempt to make GeoModelSvc "thread-safe", i.e. pass the thread-checker.

The main problems is that all the StoredMaterialManager interfaces are const and use mutable for the list of materials. Making addMaterial non-const was rather easy (and probably uncontroversial) as it's only used in a few places.

The bigger problem is getMaterial, which is used in pretty much all detector-specific factories. As an example, I applied the necessary fixes to InDetServMatGeoModel. At least for this package this works without problems. Not sure there are any road-blocks in other packages.

But before going further, I would like to have feedback from @tsulaia and @ssnyder if this is the way we want to go. Another option could be to leave getMaterial const and make sure the code is actually thread-safe. Although from what I have seen so far, the code really does not need to be thread-safe/const.

Merge request reports