Skip to content

Make Calo2Dview methods constant

Chitsanu Khurewathanakul requested to merge modernise-Calo2Dview-master into master

This request modernise Calo2Dview with the change such that there's no more unnecessary internally-cached variables. The previous implementation relies on getCaloParam class method to be called prior to filling the histograms, and stored the cached values in private member attributes. Those values are constants anyway, for 4 given subdetectors type. The new implementation groups them into struct and const references to it on demand instead of relying on calling getCaloParam to get things in sync. Effectively, this allow many class methods to be const for the future framework.

note: The original motivation was from the migration for Gaudi::Functional::Consumer in Rec/Calo/CaloMoniDst package. Those classes are derived from Calo2Dview and they need the underlying class methods to be const.

PS. This is a revised MR of !300 (closed) but now with resolved conflict after !301 (merged).

Merge request reports

Loading