Back in the old days, railroads used to use semaphores to signal train engineers whether they could go forward and how fast. You can still see one of these semaphores where the old Boston & Maine (now MBTA, natch) line to Fitchburg crosses Elm Street in downtown Waltham - mounted on a switching tower that sits next to a switch for what used to be a line to Watertown.
The signals were, of course, not very useful at night, so there were also bulbs to signal engineers:
Nowadays, the line is equipped with much larger lights to tell engineers whether it's safe to proceed:
The old switch tower and its signals are next to the Gordon Center for the Arts, which appears to be running a sale on select items: