Convert multiple data files into root files and store it in Tree

I have multiple data files. Now I want to draw histogram from each data file and store them in “.root” extension. And after that storing those root files into a common tree.

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Depending on the format of your data files, it might be straightforward. If you search on the forum, I’m sure you will find some hints. I would also suggest to start with the ROOT Primer and the tree tutorials

Thanks for replying @bellenot
The data is in .dat format and i am able to write only one dat file into tree. But what if I want to convert 10000 .dat files into root file via tree.

Then you can loop over your 1000 files, read them, and write all in the same tree. If you can do it with one, you can do it for as many you want…