Single-shot beam-position monitor for x-ray free electron laser.