Triggering on electrons and photons with CMS