Convert a csv file into ROOT format

I am a complete newbie to the root framework and would really appreciate if someone could tell me how to convert a csv(or any data file) into root format


you can use RDataFrame and CSV data source.
This is a more complete example.
Basically, you’ll have to perform the following steps:

auto fileName = "myFile.csv";
auto rdf = ROOT::RDF::MakeCsvDataFrame(fileName);
rdf.Snapshot("myTree", "myFile.root");


1 Like

Thankyou very much respected D. I also would like to know conversion of myfile.CNF to myfile.root
Do I follow the same steps. For the sake I attach herewith a file in .CNF format. Please have a look. Waiting for the suggestions and comments.
Much Respectfiles.tar.gz (12.6 KB)