FairRootGroup/FairRoot

`FairModule::AddSensitiveVolume` searches volume set twice

Opened this issue · 0 comments

386912e introduced a double linear search of the volume on vList in FairModule::AddSensitiveVolume:

  1. search happens here
  2. search happens here, see FairVolumeList::addVolume

Possible fix involves changing the error behaviour of FairVolumeList::addVolume to return the failure to add to the caller, e.g. by returning a pointer to the added volume (which is nullptr in case of not adding it).