Assessing animal welfare in a dairy cattle herd with an automatic milking system.