Software for the NA62 SAC and IRC detectors