The cab, crew compartment or driver's compartment of a locomotive, or a self-propelled rail vehicle, is the part housing the train driver, fireman or secondman (if any), and the controls necessary for the locomotive or self-propelled rail vehicle's operation.
By about 1850, high speed Crampton locomotives operating in Europe already had a much needed windshield giving some protection to the footplate area.
In Germany, the locomotive cab was introduced by the Saxon railway director and writer Max Maria von Weber.
However, until 1950 the railway directorates of the German-speaking countries continued to believe that a standing posture was essential to maximise crew vigilance.
This unsatisfactory situation changed—with few exceptions—only with the construction of the German standard electric locomotives, which for the first time were equipped with crew seats.