I would expect a railroad employee to be a civilian, not a military officer. There are books about Confederate railroads, which were always under civilian control.