How to measure pulse-to-pulse laser energy accurately for all energy levels