hep
hep copied to clipboard
groot/root-gen-streamer with ClonesArray
Trying to generate streamers for a type with a ClonesArray I get :
root-gen-streamer -p github.com/alice-go/aligo/ocdb -t AliSplineFit -o streamers2.go
root-gen-streamer: unhandled type: *go-hep.org/x/hep/groot/rcont.ClonesArray (underlying: *go-hep.org/x/hep/groot/rcont.ClonesArray)
Is that linked to https://github.com/go-hep/hep/issues/449 or is it something else ?
Note that I am actually not particularly interested in that object, but it is part of another one that I do need : is there a way to "bypass" an object in streamers ?
Thx for the report. I'll have a look at this this evening (buying a house right now...)
ok. it's not related to #449: it's because I haven't yet handled the case of fields that are pointers-type.
that said, I suspect you have a ROOT file with a an AliSplineFit object in there.
did you try running root-gen-type on that instead of root-gen-streamer (wich is more for Go-only types) ?
OK, I think I completely misunderstood what root-gen-streamer is.
What I did was :
> root-gen-type -p grp -t AliSplineFit -o splinefit.go $HOME/cernbox/ocdbs/2018/OCDB/GRP/GRP/Data/Run295820_295820_v1_s0.root
I thought I needed another step to get the factory part... but that's not (/ no longer ?) the case and root-gen-type does everything, is that right ?
I thought I needed another step to get the factory part... but that's not (/ no longer ?) the case and root-gen-type does everything, is that right ?
yep.
should probably have started with the original issue :
~/cernbox/ocdbs/2018/OCDB $ ocdb-ls GRP/GRP/Data/Run295820_295820_v1_s0.root
2019/03/14 22:38:57 key: AliCDBEntry
2019/03/14 22:38:57 riofs: could not unmarshal key payload: rbytes: read too few bytes. got=423, want=459 (pos=341 count=114 start=341) [class="AliSplineFit"]
root-gen-streamer is for when you develop a Go type for your pure-Go analysis (ie: the starting point is Go, not C++) and want to be able to store values of that type inside a ROOT file (and eventually share that data with C++, python or something code.)
ah then this one might be related with #449 indeed.