Skip to content
Snippets Groups Projects

Fix dangerous DeVP::sensor interface

Merged Gerhard Raven requested to merge improve-DeVP-sensor into master
+ 6
2
@@ -57,11 +57,15 @@ class DeVP : public DetectorElement {
return sensorNumber >= 0 ? m_sensors[sensorNumber] : nullptr;
}
/// Return pointer to sensor for a given channel ID.
const DeVPSensor* sensorOfChannel(const LHCb::VPChannelID channel) const {
[[deprecated("use sensor(id) instead")]] const DeVPSensor* sensorOfChannel(const LHCb::VPChannelID channel) const {
return sensor(channel.sensor());
}
/// Return pointer to sensor for a given channel ID.
const DeVPSensor* sensor(LHCb::VPChannelID channel) const {
return sensor(channel.sensor());
}
/// Return pointer to sensor for a given sensor number.
const DeVPSensor* sensor(const unsigned int sensorNumber) const {
const DeVPSensor* sensor(unsigned int sensorNumber) const {
return m_sensors[sensorNumber];
}
Loading