Production of J/ psi and psi (2S) mesons in pi -Be collisions at 515 GeV/c.