Skip to content

remove/reduce Calo{,Future} code duplication between Lbcom and LHCb

Gerhard Raven requested to merge remove-code-duplication into master

will be needed for a future packing MR in LHCb (*), but can be applied by itself.

(*) There is an unfortunate clash between Relation1D::Entry and CaloCluster::Entry in that both use the type 'Entry', which complicates some type manipulations used in the packing. The embedded Entry type is used to go from a container to a contained object (**), but CaloCluster::Entry is an annoying exception to that rule. As CaloCluster::Entry does not actually have to be named explicitly, there will be a future MR which removes the definition of CaloCluster::Entry -- which needs a simple adaption of code in two places: one in LHCb (and can thus be part of the LHCb MR that removes the definition) and one here. But the code here and in LHCb is actually identical, so this MR removes that duplication already so that by the time the packing MR comes around there won't be a dependency on an Lbcom MR)

(**) it is already annoying enough that KeyedContainer has an embedded contained_type and Relations have an Entry type for the same concept -- perhaps a future LHCb MR will unify those names by changing the Entry typedef in Relations* to contained_type as well...

Edited by Gerhard Raven

Merge request reports