Here I am wondering if there is a possible way to save a log file (a text file, whatever information it encloses.) in a root file. As you know, when we create a root file, we may have different conditions or log informations, of course, I could print these log-like infomation into a separate text file for my late reference. However, if I can open a log file stored in a root file, it will be convenient so much that I don’t need to remember which log file is accosiated with this root. And I think it is an outstanding feature for all rooters.
Also, I may do this job by creating a canvas and print info on the canvas. If I have too much information and so many lines, I cannot handle.
Acturally this way by TMacro is still not so convenient. I mean, although I can store my log file as a macro, I cannot click it to see its content right away, and if tons of log infomation, I can page down and up.
Yes, I tried. I use the following simple code to do that.
TFile *outputfile = new TFile("testTMacro.root", "CREATE");
TMacro * m = new TMacro("logfile", "store log information");
for (int i =0; i <1000>AddLine("I am one line of TMacro!!!");
then open the outputfile to TBrowser. logfile i s over there. I have no idea how to see its content.