The epic tome of Michael McMahons's and Jeremy Clements is the thing to have. The RPSI still has one copy left.
This is the absolutely definitive dictionary for GSR / CIE steam. It's bulky, but worth every cent.
Having been through it many times in detail, all I would say is that it's a pity there's no index, and that the rather excellent cover and rear pictures, plus a note in the text, telling us that grey locos had black smokeboxes, and (somewhat bizarrely) black numberplates with red letters, is incorrect.
Tiny criticisms, but otherwise an absolute "must-have".
Drew Donaldson, Bob Clements and Jack O'Neill produced a slimmer volume in the 1970s based on their personal, and encyclopaediacally correct, experiences of such locos as were surviving in use into the 1950s and 60s. Also a fascinating read. It's long, long out of print, but I think the RPSI has a copy it's second hand stuff.