J/ψ and ψ(2S) production in pp collisions at $ \sqrt {s} = 7{\text{Tev}} $