Add function to classify events in the example.C file