Online control of the dose during ion therapy by means of prompt radiations