Electronic properties of Co2MnSi thin films studied by hard x-ray photoelectron spectroscopy