~sbinet/go-hep

Fw: Re: Question about groot

Sebastien Binet <work@sbinet.org>
Details
Message ID
<Ok2rdcr1g6daBMWg0SDiaYKY3LhBobM1h--3NFUzUQlOPyD9ZnePkAmTsWHdBzx5JUTFOPVbxVkgKIrpWfIZx_9AR4eJOHuXjsbcnvfIoYs=@sbinet.org>
DKIM signature
missing
Download raw message
(resending, w plain/text this time...)

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, February 18th, 2021 at 7:27 PM, Sebastien Binet <work@sbinet.org> wrote:

> hi Joe,
>
> linking Go code against C/C++ is doable[1,2] but still a bit of work:
> - one needs to write Go code that will be exposed to C/C++
> - not all Go types can be easily exported to C/C++
>
> it's a bit of mechanical work that should, eventually, be automatized (there's some support for that from SWIG, I think.)
>
> here is an example of what I did for a friend at the lab:
> - https://github.com/rmadar/go-topquark-reco/tree/main/capi (the "glue" code)
> - https://github.com/rmadar/go-topquark-reco/blob/main/tbuilder/tbuilder.go#L64 (the wrapped code)
> - https://github.com/rmadar/go-topquark-reco/blob/main/capi/test-root.C (calling it from a ROOT macro)
>
> there's probably room for a "little" tool that generates some of this boilerplate code...
>
> (like I've started a few years ago, for Python[3])
>
> long story short: I think it's doable for small code bases, and for ROOT files that groot can grok (the Athena EDM is probably not going to work, the persistent one, perhaps.)
>
> hth,
> -s
>
> [1]: https://golang.org/pkg/cmd/cgo/
> [2]: https://talks.godoc.org/github.com/sbinet/margo/part-3/talk.slide#9
> [3]: https://github.com/go-python/gopy
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, February 18th, 2021 at 7:05 PM, Boudreau, Joseph Francis <boudreau@pitt.edu> wrote:
>
> > Sebastian, I was wondering whether groot can be linked with c++ code
> > and whether that would be easy enough to even be worth doing?
> >
> > Thanks, Joe.
> >
> > -------------------------------------------------------------
> >
> > Don't matter where you are
> >
> > Everybody's gonna need a ventilator--From Ventilator Blues, by the Rolling Stones
Reply to thread Export thread (mbox)