I used MakeSelector on a TTree. When processing with more than one file in a TChain I get the following error after each event once the second file is reached:
Warning in TTreeReader::SetEntryBase(): The current tree in the TChain h42 has changed (e.g. by TTree::Process) even though TTreeReader::SetEntry() was called, which switched the tree again. Did you mean to call TTreeReader::SetLocalEntry()?
chain.MakeSelector("h1analysis", "=legacy"); // ROOT 6.06 or newer
Well, you have “covar[ntracks][15]/F” (and “ntracks/I”) but I am not sure if such two dimensional variable size arrays are supported by all ROOT analysis skeletons.
Turns out I should have looked closer at the error message. If I replace fReader.SetEntry(entry); with fReader.SetLocalEntry(entry); in the Process function of the .C file, then it works.
@axel It sounds like a bug in the new TTree::MakeSelector (or actually two bugs, one related to the “covar” branch not being treated properly and another one to the SetEntry).