I can't find any "starter documentation" on x/hep/rootio
Created by: jpivarski
The code snippet at the top of the API documentation is very terse and contains an error: it reassigns err
but the inferred type is (now) different between those two lines.
Having found a "Hello, world" Go program on the web to edit, I wrote the following:
package main
import "go-hep.org/x/hep/rootio"
import "fmt"
func main() {
f, err := rootio.Open("~/storage/data/TrackResonanceNtuple_uncompressed.root")
obj, err2 := f.Get("twoMuon")
tree := obj.(*rootio.Tree)
fmt.Printf("entries= %v\n", t.Entries())
}
It fails with
% go build test.go
# command-line-arguments
./test.go:9:14: impossible type assertion:
*rootio.Tree does not implement rootio.Object (missing Class method)
./test.go:10:31: undefined: t
(I have Go 1.9 and did go get go-hep.org/x/hep/rootio
without specifying a version: is it taking master from GitHub or the latest release?)
Is there tutorial-style documentation that I simply haven't found? Are there any minimally working examples? Thanks!