wearing your - hat (or with your - hat on) used to indicate that someone is speaking or acting in a particular, especially professional capacity.
2013Bruce BondPassing Professional Skills Tests for Trainee Teachers You are there as a teacher, not a friend. Remain professional throughout and always have your teacher's hat on.