Yes, the news account I read said that they waited for a north bound freight train to pass and once it had, they began to cross the tracks even though the warning lights were still flashing and the barricades were still down. When they crossed to the other set of tracks is when they were hit by a southbound Amtrak train. The Amtrak station is just down the street from Yoshi's, so I'm assuming the train was going at a somewhat slower speed since it was nearing its stop at the station. That may have been what saved their lives.
I'm sure the train tracks were there first, probably dating back to whenever the Port of Oakland first became a major freight harbor. I'm kind of surprised there are not more accidents around there, what with tourists visiting the area and perhaps having a bit too much to drink at one of the bars/restaurants and then trying to find their way around the unfamiliar terrain at night.