RNTuple scan from root prompt?

I am trying to do a simple scan of an RNTuple from the ROOT prompt. I have setup with:

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.36.00/arm64-mac155-clang170-opt/bin/thisroot.sh

I can open a file and see in .ls:

KEY: ROOT::RNTuple EventData;1 object title

But I don’t seem to be able to do a Scan on EventData. Since this is the first time I am trying this, should one be able to work interactively with an RNTuple? I also don’t see EventData in the browser.

I am working on read/write to/from RNtuple from C++ using ROOT Version: 6.34.04 on el9. But it would be nice to be able to do some simple things with interactive ROOT to check what I am doing.

    thanks, RD

I am not sure but I guess this can help: ROOT: ROOT::RNTupleReader Class Reference
@jblomer might confirm.

Maybe it’s too early of a version for 6.36.00. I cannot do anything with EventData, tab-completion doesn’t work:

root [2] EventData->input_line_30:2:3: error: use of undeclared identifier 'EventData'
 (EventData)
  ^
Error in <TTabCom::DetermineClass>: variable "EventData" not defined?

problem determining class of "EventData"

variable "EventData->" not defined.

Thank you for trying out RNTuple!

Your experience will be better with the 6.36 release. With 6.34, we stabilized the data format, meaning that future ROOT versions will be able to read the files. With 6.36, we stabilized a first part of the API, so that code using the (non-experimental part of the) RNTuple API will continue to work with future ROOT versions.

Regarding your questions:

  • Scan: RNTuple itself does not provide a Scan method; the recommended way is using RDF like this for example for the first 15 rows:
    ROOT::RDF::FromRNTuple("EventData", "/path/to/file.root").Display("", 15)->Print().
    Individual entries can be printed directly by RNTuple like this for the 137th entry
    ROOT::RNTupleReader::Open(*_file0->Get<ROOT::RNTuple>("EventData"))->Show(137)

  • That leads to your last question: unfortunately, RNTuple objects are currently not automatically made available as variables in the ROOT prompt. We will look into this.

  • Browsing: there is support for the RBrowser (web graphics). You can start root with root --web=on to get the web version of the TBrowser. For the classic browser, RNTuple support will come in ROOT 6.38 (work started).