Write a text file from a root


What I am looking for, might be really simple - I just need to save some information, like the number of events of a .root file, or even some more info, into a text file , and each info to be saved in a separate line . Is there a way to do this ?

Thanks in advance !


You can use any of the a text file i/o provided by C++ ; for example cstdio (fopen, fprintf, fclose) or iostream (ofstream and operator<<);