I want to loop twice over a TTree/TChain (first finding some min and max values, second time doing things that need min/max). To speed up the loops, I’d like to deactivate the branches that I don’t need. Unfortunately, they don’t reactivate.
Everything is fine if I load two files into the TChain, but it doesn’t work if there is only one.
I attach a minimal example, and two root trees to run over.
I didn’t look what happens in the implementation, but it looks like changing the branch status AND getting at least one entry between status changes disconnects branches and variables. At least with the 5.30/03 I have running reconnecting the branches by calling open() after computeminmax() made this work for only one file in the chain.