How to Quickly Inspect the Content of a File?

Note: The root command line tools were released with ROOT 6.06.

ROOT provides command line tools that allow you to quickly inspect and modify the content of ROOT files. They can be divided in two categories:

  1. The ones having a behaviour which is compatible with the widely known *nix tools like ls, rm, mkdir.
  • rootls : list the content of a ROOT file.
  • rootcp : copy objects stored in a file to another file.
  • rootrm : delete objects contained in a file.
  • rootmv : move objects stored in a file to another file.
  • rootmkdir : create a “directory” inside a ROOT file.
  1. The ones which automate very common operations performed on widely adopted ROOT classes:
  • rootbrowse : open a TBrowser directly on the content of a ROOT file.
  • rooteventselector : extract a range of events of a tree contained in a file and put them as a new tree in another file.
  • rootprint : plot objects in an image file.

More detailed instructions about the switches they offer and example command lines can be inspected using the -h switch.