The Disneyland railroad sweeper train makes one last circle tour only picking up park guests on the way, then everyone disembarks at the Main Street station. This train leaves at closing.
Sweeper trains are based on the number of order of which trains come out on the line on a particular day. The first train out on the line in the morning is usually the first train off the line for the night. The second train follows out soon after the first train when coming out on the line for the day, but stays out for a longer time about 30 minutes prior to part closing.
The last train to come out for the day is usually the last train put away for the night. That is the train that normally sweeps. The train departs Main Street around midnight and returns between 12:15 - 12:30 depending on the engine pulling the train and depending on how busy the stations actually are.
Growing up in Los Angeles in the 70s/80s we visited Disneyland on a regular basis and often after school, before "Annual Passes".