Transient thermal process induced by swift heavy ions: Defect annealing and defect creation in Fe and Ni