I run MainEvent.cxx and built thousands events and read them back. However, none of events have been successfully read back. The problems is due to this line of code in TTree::GetEntry:
Particularly, the Foreach function parses 0 as the second arguments and it actually invoke 0 task:
pool.Foreach(mapFunction, nbranches - fSeqBranches.size());
In my case, nbranches = 1 and fSeqBranches.size() = 1. I tries to remove fSeqBranches.size() and only parse nbranches into Foreach function. It worked. I guess there must be some reasonings behind the implementation. Could anyone look at it and give some explanation?