Fix dangerous DeVP::sensor interface
- deprecate
sensorOfChannel(const LHCb::VPChannelID channel)
- add
sensor(LHCb::VPChannelID channel) const
The reason for this change is that there is already sensor(unsigned int sensorNumber) const
, and because there is an implicitly defined
conversion from VPChannelID to unsigned int, one can invoke sensor
already with a VPChannelID
, which will result in an out-of-bounds
access. To avoid this, the overload of sensor
for VPChannelID
is added, at which point there is no use anymore for
sensorOfChannel
...
Edited by Marco Cattaneo