Id say torpedoes and fusees (road flares)
A railway detonator (also called a "torpedo" in the U.S.) is a device used to make a loud sound as a warning signal to train drivers. The detonator is the size of a large coin with two lead straps, one on each side. The detonator is placed on the top of the rail and the straps are used to secure it. When the wheel of the train passes over, it explodes emitting a loud bang. It was invented in 1841 by English inventor Edward Alfred Cowper
Typical uses of detonators include:
a warning of a caution or stop signal aspect in dense fog, when signals are difficult to see
a warning of a train stopped on the line ahead by an incident or accident – the train's personnel are usually responsible for placing the detonators
a warning of permanent way works ahead
when a signaller or other railway employee requires to stop approaching trains in an emergency
On a line with a high line speed, detonators may require to be placed on both running rails.
As with all explosives, detonators can become unstable after a period of time and therefore they must be replaced regularly.
Aside to popular belief, they detonate upon pressure, rather than hitting or banging it. This then makes them safe to travel, as they cannot detonate in a bag, or storage container. Attempting to explode them by striking with a hammer will not work.
Upon hearing the noise of a torpedo exploding, the engineer would reduce speed to 20 mph or less; the train could not resume its original speed until it had travelled at least 2 miles beyond where it encountered the device. Traditionally used in pairs to ensure that the sound registered with train crews, torpedoes in the U.S. today are essentially obsolete as a modern locomotive cab's soundproof construction renders the devices useless.
Quoting from the terminology book of the Brotherhood of Railroad Signalmen:
A torpedo is a device which is strapped to the top of a rail. When a train drives over the torpedo, it emits a very loud "bang" which can be heard over the noise of the engine, and signals the engineer to stop immediately. Torpedoes are generally placed by the flagman when protecting a train ahead. Torpedoes are about 2" x 2", red, about 3/4" high, and have two lead straps attached which hold it to a rail. The torpedo has discs inside and are filled with detonating powder. The Torpedo was invented about 1874.