Same as in 706patch1 (add functions to classify events in the example.C file)