Backport of some fixes in master
requested to merge clemenci/lhcb-conditions-database:jonrob/all-pmts-active into jonrob/all-pmts-active
This is just a backport of:
with minor adaptations.
This is just a backport of:
with minor adaptations.