Delete G4Events ONLY when postprocessing is done

Make Gaussino aware of the fact that there is some postprocessing of the events that might happen asynchronously. The G4Events must not be deleted until G4 says that the postprocessing is done. The additional check that is added might be potentially dangerous and is difficult to be tested (we solely rely on G4), so we might be extra careful and add it only in the cases when we know that postprocessing will take place (see comment in the code). Leaving WIP until we have that discussed. cc: @gcorti, @fbilandz

Edited by Michal Mazurek

Merge request reports