Speaking from experience, as a tube Train Driver of some years, redmug has given you the correct answer, if a train halts so that the shoes that pick up the traction current are over a railgap, all the main lights in that unit, (usually two care to a unit), go out, except for the emergency lights, which are run off Batteries, what you have to worry about, is if those batteries are good or not, because if they run out of power, then you will be left in complete darkness.
Thats the basics of your question from the train side.