In early days, Railway police performed many functions and railways employed more of them than any other type of worker. They were very much in the public eye because until signal boxes were introduced, constables were responsible for signalling. A policemen was often the sole person in charge of a small station. At many stations their duties included ticket-collecting.

Taff Vale Railway Policeman PC John Wallbridge c.1850
http://www.headline.org.uk/hw-uploads/images/TVR-Pc-John-Wallbridge.jpg