Getting number of events per thread in a multithreaded run

Is there any way that I can get the number of events simulated by each thread in a multithreaded run ?
G4Run::GetNumberOfEventToBeProcessed() gives the total number of events from all threads combined. I wish to know the number of events simulated separately by each single thread.

I am using Geant4 10.4 with multithreaded support to simulate events and store results in Geant4 NTuples (using the AnalysisManager). I am not merging the output files. Thus I get one root file per thread as a result.

I need to know the total number of events simulated in order to normalise the results to expected flux levels.
If I can get the number of events simulated in each thread, I can store this information in each root file. This allows me to use each root file as an independent Geant4 run result.

Thanks in advance

Hi,
In your UserRunAction::EndOfRunAction(), invoke aRun->GetNumberOfEvent(). If it is invoked in a worker thread, you will get the number of event processed in that thread.
Hope this helps, Makoto

Thanks ! That worked perfectly well for me
Regards