A template method for measuring the iron spectrum in cosmic rays with Cherenkov telescopes