prepare for DetDesc decommissioning
To simplify the migration from DetDesc to DD4hep we wanted to have header files that would allow to easily switch from one implementation to the other, for example including DetDesc/ConditionAccessorHolder.h
or LbDD4hep/ConditionAccessorHolder.h
.
To reduce the number of changes and chained MRs, we introduced DetDesc/GenericConditionsAccessorHolder.h
which redirects to the correct header, and alias the DD4hep versions using the old names:
namespace LHCb::DetDesc {
using LHCb::Det::LbDD4hep::ConditionAccessorHolder;
}
While this allows to optionally use the adaptive implementation changing just one line, it makes difficult to actually remove the DetDesc implementation from the project and causes compilations errors if you accidentally include both DetDesc/GenericConditionsAccessorHolder.h
and DetDesc/ConditionAccessorHolder.h
.
In other cases we just hacked the DetDesc implementation of detector header files to automatically redirect to the DD4hep version. Again, this reduces the number of changes in downstream code, but makes it practically impossible to drop the DetDesc implementation (as it's used as a trampoline into DD4hep).
My proposal is to add a compatibility library (probably header only) to host all the redirections and to use a dedicated namespace to clearly identify what is multi backend and what is backend specific (ideally only for DetDesc as all the DD4hep related code should be in Detector).