You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ROOT SetAlias export and Python-to-ROOT AST translation for aliases
**Extended commit description:**
* Introduced `convert_expr_to_root()` static method using `ast` to translate Python expressions into ROOT-compatible syntax, including function mapping (`mod → fmod`, `arctan2 → atan2`, etc.).
* Patched `export_tree()` to:
* Apply ROOT-compatible expression conversion.
* Handle ROOT’s TTree::SetAlias limitations (e.g. constants) using `(<value> + 0)` workaround.
* Save full Python alias metadata (`aliases`, `dtypes`, `constants`) as JSON in `TTree::GetUserInfo()`.
* Patched `read_tree()` to:
* Restore alias expressions and metadata from `UserInfo` JSON.
* Maintain full alias context including constants and types.
* Preserved full compatibility with the existing parquet export/load code.
* Ensured Python remains the canonical representation; conversion is only needed for ROOT alias usage.
0 commit comments