hep: groot/rtree: problem reading slices with formula?
I am trying to read a slice, i.e a vector<float> branch with a rtree.Formula, using something like:
VarsName := []string{"hits"},
Fct :=: func(xs []float32) []float64 {
res := make([]float64, len(xs))
for i, x := range xs { res[i] = float64(x) }
return res
}
f := r.FormulaFunc(VarsName, Fct)
getSlice := f.Func().(func() []float64)
In the event loop, getSlice() returns always an empty slice. Given it’s quite late, it’s not impossible I am doing a mistake … But I wanted to know if there would be a reason why reading slices can fail with rtree.Formula.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- groot/rtree: add formula test for slices Fixes #736. — committed to sbinet-hep/hep by sbinet 4 years ago
- groot/rtree: fix handling of rleaf-element with a "This" StreamerSTL Fixes go-hep/hep#736. — committed to sbinet-hep/hep by sbinet 4 years ago
amazing, it works!
ok, thanks.
as soon as I finished my “entretien annuel”, I’ll commit the fix: