This afternoon I was driving on my way home, and traffic was at a standstill, so I was stuck on a railroad track. I couldn't back up; there was no space for me to go forward. As luck would have it, there was an Oakland PD police car nearby that signaled me to pull over. The officer said I was not supposed to be blocking the railroad track. (Tell me something I don't know.) He asked for my driver's license, registration, proof of insurance, and shortly thereafter, he gave me a ticket.
It is your responsibility as a driver to gauge the traffic ahead of you prior to attempting to traverse a railroad crossing. Pay the fine; you have no grounds to contest the ticket.