Added function to write events in LHCO format.