Separation of electrons and pions by a transition radiation detector using flash ADCs