Detection of X-rays and electron energy loss events in time coincidence