getTeamIDs function

Retrieve team IDs for event files