Résumé : The energy calibration and resolution of the electromagnetic calorimeter (ECAL) of the CMS detector have been determined using proton-proton collision data from LHC operation in 2010 and 2011 at a centre-of-mass energy of √s = 7 TeV with integrated luminosities of about 5fb-1. Crucial aspects of detector operation, such as the environmental stability, alignment, and synchronization, are presented. The in-situ calibration procedures are discussed in detail and include the maintenance of the calibration in the challenging radiation environment inside the CMS detector. The energy resolution for electrons from Z-boson decays is better than 2% in the central region of the ECAL barrel (for pseudorapidity