Measurement of Higgs boson production in the diphoton decay channel inppcollisions at center-of-mass energies of 7 and 8 TeV with the ATLAS detector