Project

General

Profile

Bug #18583

Inconsistent documentation of geo::GeometryCore::NearestWireID() and geo::GeometryCore::NearestChannel()

Added by Gianluca Petrillo almost 2 years ago. Updated 12 months ago.

Status:
Assigned
Priority:
Normal
Assignee:
Category:
Geometry
Target version:
-
Start date:
12/15/2017
Due date:
% Done:

0%

Estimated time:
Occurs In:
Experiment:
-
Co-Assignees:
Duration:

Description

Both methods declare to return an invalid value on failure, while they actually throw an exception.
This inconsistency must be fixed.

History

#1 Updated by Gianluca Petrillo almost 2 years ago

While the easiest way is to change the documentation, the behaviour reported by the documentation yields to faster code, which is potentially relevant for example in LArG4 module, where geo::Geometry::NearestChannel() takes non-negligible time.

The solution goes upstream to a change in geo::PlaneGeo::NearestWireID(), which should be modified (breaking change) to return an invalid wire instead of throwing an exception. After that, the methods using it should be modified to correctly react. For the two methods of geo::GeometryCore subject of this ticket, this means to just act as pass-through.
Note that the standard geometry test (larcorealg:source:test/Geometry/GeometryTestAlg.cxx) is actually testing the throw of an exception, and it will have to be updated too.

#2 Updated by Gianluca Petrillo almost 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Gianluca Petrillo

My proposal to attack the problem the hard way and fix the code (as opposed to fix the documentation) was accepted.

#3 Updated by Katherine Lato over 1 year ago

  • Assignee changed from Gianluca Petrillo to Erica Snider

#4 Updated by Katherine Lato 12 months ago

  • Assignee changed from Erica Snider to Paul Russo


Also available in: Atom PDF