Search for “TApplication” in the “ROOT Primer (5.34)” and the “ROOT User’s Guide (5.34)”. See also some examples: