Design and measurement of a combined function magnet intended for a cancer therapy accelerator