Skip to content

DetectorModel: Move Instantiation to Class Factory Method

Simon Spannagel requested to merge detectormodel_factory into master

see title. This moves DetectorModel instantiation from a private method of GeometryManager to a static factory method of the DetectorModel class itself.

This avoids having to use the full GeometryManager with all dependencies in situations we we simply need to instantiate a DetectorModel, like in the WeightingPotentialgenerator. Currently this works, but it will not anymore with an abstract base DetectorModel class.

@kwolters I remember you having some reservations about this factory pattern but to me it looks like the most straight forward solution in this case.

Re !531 (closed) (cc) @rprivara

Merge request reports