. . "Where a doorway opens upon a railroad track or upon a tramway or dock over which vehicles travel, a barrier or other warning device shall be placed to prevent workmen from stepping into moving traffic." . .