# GoHEP/groot: v0.28.0 (writing user "classes")

**URL:** <https://root-forum.cern.ch/t/gohep-groot-v0-28-0-writing-user-classes/41912>\
**Category:** Evolution Proposals, Apps & Ideas\
**Created:** [October 19, 2020, 4:11pm UTC](https://root-forum.cern.ch/t/gohep-groot-v0-28-0-writing-user-classes/41912 "2020-10-19T16:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbinet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sbinet/32/13166_2.png) [@sbinet](https://root-forum.cern.ch/u/sbinet)\
**Post date:** [October 19, 2020, 4:11pm UTC](https://root-forum.cern.ch/t/gohep-groot-v0-28-0-writing-user-classes/41912/1 "2020-10-19T16:11:31Z")

</div>

hi there,

quite happy to announce the release of `Go-HEP@v0.28.0`.

- [https://go-hep.org/news/release-0.28.0/](https://go-hep.org/news/release-0.28.0/)
- [https://twitter.com/0xb1ns/status/1318220252099039232](https://twitter.com/0xb1ns/status/1318220252099039232)

The main new feature of that release (among fixes and code gardening) is the ability to write “structured trees”, ie: write trees with Go user types (that are translated into their C++ equivalent).

_e.g.:_

```auto
type Event struct {
    I32 int32 `groot:"i32"` // -> translated into Int_t
    Sli []float32 `groot:"sli"` // -> std::vector<float>
    Ps []Particle `groot:"ps"` // -> std::vector<Particle>
}

type Particle struct {
    Chg float32 `groot:"charge"`
    Alg string `groot:"alg_name"` // -> std::string
    Mom []float64 `groot:"mom"` // -> std::vector<double>
}

```

here are complete examples:

- [https://pkg.go.dev/go-hep.org/x/hep@v0.28.0/groot/rtree#example-package-CreateEventNtupleFullSplit](https://pkg.go.dev/go-hep.org/x/hep@v0.28.0/groot/rtree#example-package-CreateEventNtupleFullSplit)
- [https://pkg.go.dev/go-hep.org/x/hep@v0.28.0/groot/rtree#example-package-CreateEventNtupleNoSplit](https://pkg.go.dev/go-hep.org/x/hep@v0.28.0/groot/rtree#example-package-CreateEventNtupleNoSplit)

enjoy!

-s
