Go HEP release 0.6

DOI

Release v0.6 is a small iteration (code-wise) but contains:

  • a software paper submitted to the Journal of OpenSource Software (JOSS): JOSS Paper
  • a new WIP command, rootio/cmd/root-dump, to dump the content of ROOT files, including the entries of TTrees,
  • documentation fixes and updates in the rootio package,
  • still more work in the Delaunay and Voronoi area (thanks Bastian!)

One API change that is worth noting, is the retrieval of rootio.Keys from a rootio.Directory. The d4823f0 changes:

type Directory interface {
    Get(namecycle string) (Object, bool)
}

to:

type Directory interface {
    Get(namecycle string) (Object, error)
}

this allows to more quickly bubble-up errors while reducing boilerplate code at the Directory.Get(...) call site:

diff --git a/cmd/root2npy/main.go b/cmd/root2npy/main.go
index c81e81d..e3827fa 100644
--- a/cmd/root2npy/main.go
+++ b/cmd/root2npy/main.go
@@ -159,9 +159,9 @@ func main() {
        }
        defer f.Close()
 
-       obj, ok := f.Get(*tname)
-       if !ok {
-               log.Fatalf("no object named %q in file %q", *tname, *fname)
+       obj, err := f.Get(*tname)
+       if err != nil {
+               log.Fatal(err)
        }