TTreeFormula and TChain

For those who find this in the future I also proposed a slightly more compact solution in another thread. It would be nice for someone to include this functionality in TObjArray.