However, I don’t know if ROOT is able to parse such a text output afterwards, for example in order to ‘tr_x_sec->ReadFile(“tr_x_sec.out.txt”)’. You might need to edit this file manually. If you have just one “text row” per “tree entry”, remove the first column (called “Row”) and get rid of all “*” characters that are present inside (and possibly modify/add the first line which can keep all branch descriptions - see http://root.cern.ch/root/html/TTree.html#TTree:ReadFile for details).
An expert’s advice is needed here.
You can also redirect the output of Scan as follow:
// Read and dump the tree entries
t->GetPlayer()->SetScanRedirect(kTRUE); // You may have to cast t.GetPlayer() to a TTreePlayer*
t->GetPlayer()->SetScanFileName("output.txt");
t->Scan("*");
produces the same output text file format as the one in my previous post here.
The question is … can ROOT read it back?
If not, is there any other simple method to “dump” a TTree into an ascii file and read it back later (let’s assume that the TTree is “simple enough”, whatever this “requirement” may mean in the context here)?