You can measure the temperature of a brick with a thermometer, but then you should understand what that thermometer is really telling you: https://bayes.wustl.edu/etj/articles/theory.1.pdf
And when you do that, you'll see why a thermometer doesn't do a good job of measuring the effective temperature of, say, a pumped laser crystal.