Commissioning the LHCb calorimeters with cosmic rays