Csv to TTree

Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 6.30
Platform: win10
Compiler: vc++

How to store a CSV file as a TTree?


Thanks for the interesting post.
Have you tried RDataFrame and the CSV data source? ROOT: tutorials/dataframe/df014_CSVDataSource.C File Reference

auto df = ROOT::RDF::FromCSV(fileName);
df.Snapshot(treeName, rootFileName);

I hope this helps.


1 Like

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