JuliaHEP / RootIO.jl

Interface to ROOT file format with read/write support based on the C++ ROOT libraries.
MIT License
2 stars 1 forks source link

[Feat] Baseline support (2/2) #2

Closed yashnator closed 1 month ago

yashnator commented 2 months ago

This pull request is part (1/2) of the baseline support for RootIO.

The PR provides functions to:

Example:

import RootIO, ROOT
using DataFrames
file = ROOT.TFile!Open("example.root", "RECREATE")

name = "example_tree"
title = "Example TTree"
data = (col_float=rand(Float64, 3), col_int=rand(Int32, 3))
tree = RootIO.TTree(file, name, title; data...)

RootIO.Write(tree)
ROOT.Close(file)

Checklist before requesting a review:

grasph commented 1 month ago

Please find my comments below,

https://github.com/JuliaHEP/RootIO.jl/blob/49a741dc10d9c17fd20c2f54e1f8501a4865fa06/src/RootIO.jl:

LL 129ff: ~I don't get how you specify to ROOT the branches that hold array lengths. Do you have a test that shows that it works ?~ Remove code from the c-array support as the implementation is not completed and it is the topic of PR #3.

LL 50 and 59 bufsize parameter to change from 100 to 3200, the native function default.

L 144: eletype -> eltype ?