Speaking completely hypothetically I could imagine that a "cohort" (I believe that's the proper term here) study could be done where they randomly survey people and ask them:
- Were you vaccinated for H1N1?
- Did you become infected with H1N1?
- Did any of your immediate (living in same household) relatives as you get sick with H1N1?
- Did any of your co-workers get sick with H1N1?
They can then analyze (controlling for age, gender, etc) whether the incidence of infection was drastically influenced for those around others who had been infected based on whether or not they were vaccinated (2 weeks prior to the contact at least).
Preferably they can then also ask the relatives and co-workers, allowing for the actual infection network to be analyzed (i.e... if an most of entire office was good about vaccinating, they could significantly have impacted the spread to their immediate family).
It is possible this is already how they test effectiveness.