A train is travelling towards a tunnel at relativistic velocity. The tunnel has two gates on either side that open/close to admit/reject the train. The train is the same length as the tunnel when it at rest in the tunnel's frame of reference. In the tunnel frame, the train is moving so it is contracted and can fully fit inside the tunnel. Thus, the gates are initially closed, open right before the train enters, close while the train is completely inside the tunnel, open right before the train leaves and closes right after the train has completely left.
How would you describe this sequence of events in the frame of reference of the train?