# Writing ROOT Tree from Julia

**URL:** https://discourse.julialang.org/t/writing-root-tree-from-julia/110902
**Category:** High Energy Physics
**Created:** [February 28, 2024, 2:27pm UTC](https://discourse.julialang.org/t/writing-root-tree-from-julia/110902 "2024-02-28T14:27:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grasph](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grasph/32/25684_2.png) [@grasph](https://discourse.julialang.org/u/grasph)
#### Post date: [February 28, 2024, 2:27pm UTC](https://discourse.julialang.org/t/writing-root-tree-from-julia/110902/1 "2024-02-28T14:27:41Z")

</div>

Hello,

At the JuliaHEP workshop of last November the need for ROOT Tree write support in Julia using a binding to ROOT libraries was identified.

**TTree writing from Julia is now possible !**

The ROOT wrapper example shipped with [WrapIt!](https://github.com/grasph/wrapit) covers now TTree, including write support. Examples are provided in [examples/ex002-ROOT/TTree\_examples](https://github.com/grasph/wrapit/tree/main/examples/ex002-ROOT/TTree_examples) .

Apart from a change that replaces void\* pointer argument to typed one, the interface is identical to the ROOT C++ one, which is based on pointers. While the interface will be familiar to people used to the C++ one, it is not as friendly and as safe as expected from a Julia package. Providing higher level interface is the topic of a proposal for a Google School of computing project, [GSoC project](https://hepsoftwarefoundation.org/gsoc/2024/proposal_Julia-HEP-Cpp.html).

Note that for reading, we already have an excellent friendly, safe, and efficiency interface with [UnROOT](https://github.com/JuliaHEP/UnROOT.jl).

Work on packaging the ROOT C++ libraries as a \_jll package has started. We are facing some difficulties, link to the requirement of the BinaryBuilder([https://docs.binarybuilder.org/](https://docs.binarybuilder.org/)) to cross-compile the software on Alpine, that uses musl instead of glibc. Any help in solving this issue is welcome. See this [PR](https://github.com/JuliaPackaging/Yggdrasil/pull/7666) for the details.

Philippe.
