African heads of state gathered in the capital Kampala for the swearing-in , as Mr. Museveni begins a new five-year term in office .