Saving printed results in a file

Dear Experts,

I’m using TMVA in order to optimize a selection. I plan to run it in a loop and extract only the significance. Is there any way to save the printed results in a file; I mean the results from TMVA::StatDialogMVAEffs* gGui …; gGui->UpdateSignificanceHists(); gGui->PrintResults(info); …or I have to modify the method UpdateSignificanceHists()? Any idea…?

I am using ROOT6

Thanks a lot,


Is it enough for you to use the unix command to output to file?

root -l do_classification.C > file_to_save_output_to.txt




I think the best is to update the function UpdateSignificanceHists yourself. It is defined in the tmva/tmvagui/src/mvaeffs.cxx.

You can reload the new implementation directly from the ROOT prompt and call it directly the function without using the GUI. For example for a dataset with name dataset and stored in the file output_data.root, you can do:

root[0] TMVA::mvaeffs ("dataset","output_data.root")