Electric machine connected or connectable to gearbox input shaft