I think what you want is to be able to work out what Key something is in based on the chords that are being played. Once you have the Key for a song, you can easily work out what to play as a solo over the top.
If you have E Major, A Major and B Major.. then most likely it is in the Key of E Major.. on the other hand if you had E minor, B Major and A Major you might be in the Key of B Major. Or if you have A Major, B minor and E Major, you might be in Key of A Major..
Is that what you mean?