The calculation of electron energy distributions and attachment coefficient for electron swarms in oxygen