Reading part of a text file

Hello,

I have a couple of text files containing data, but all files contain a description of my simulations in the beginning. Is there a way to tell ROOT to read the files beginning in a specific line so it could ignore the descriptions?

I annexed an example. I would like to tell ROOT to read data beginning at line 36.

Thanks a lot for the help.

LGI.
dose.dat (8.65 KB)

This is a C++ question more than a ROOT question. You’ll have to read your file skipping the first 35 lines.
You can get an idea about how to achieve that here cplusplus.com/doc/tutorial/files/

Looking at your file it seems readable in a TTree using:

TTree::ReadFile:
root.cern.ch/doc/master/classTT … f1d3bdc120

(TTree::ReadFile ignores the line starting with #)