Framework for effricienct analysis of ROOT TTrees