Skip to content

FileWriter extension to JSON Format

Alexander Ferk requested to merge aferk/corryvreckan:FileWriterJSON into master

Update of the FileWriter Module which enables it to export objects from the clipboard to a JSON array. As the JSON capability of root is limited to branches, this will flatten the structure but it is quite useful for communication with e.g. Python, which otherwise would need ROOT installed.

TextWriter now supports another config key format. At the moment 3 output formats are supported:

  • root: equivalent to the current behavior (defaults to this option)
  • txt: output equivalent to the TextWriter, making this class obsolete (Do we want to keep it for legacy reasons?)
  • json : flattened tree as JSON Array using TBufferJSON::ToJSON() on each object.

However, TBufferJSON::ToJSON() needs a newer ROOT version in the docker container, resulting in a failed pipeline for the Docker. Should I submit a separate MR? (the change to /etc/docker/Dockerfile.deps is already included in this branch)

Merge request reports