New example for event loop using TChain