decoding TDC data