Parse CSV file tree name in pyroot


I’m trying to parse CSV files from CERN open data and I am using pyroot.
Now, I am using the function parse_CSV_file_with_TTree_ReadStream(tree_name, afile)
defined in the link here:

I understand that afile is just the csv file you want to parse, but what is the tree_name? I tried putting in a random name but of course it put out an error.

Thanks in advance!


The tree name is the name identifying the TTree object which exists in the file.
You can open the file and browse it to identify the name
For example do

file = ROOT.TFile(afile)



1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.