Oxygen adsorption on graphite and nanotubes