Murge vector of accumulable

Hello,

I was wondering if it is possible to murge vector of accumulable.
I have vector of accumulable that accumulate edep for each voxel : std::vector<G4Accumulable> edep. The problem is that when use the multithreading, I need to murge the accumulables to be able to get the real edep for each voxel. But it doesn’t work when I try to murge it like this : accumulable-> Murge().
It works when I murge accumulable but doesn’t work when I try to murge vector of accumulable.
How can I do this ?

1 Like

Hello,

For complex types, you need to define your own accumulable object. We provide an example for an std:map in Application Developer Guide:
https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Analysis/accumulables.html

See the code in the ProcCounterAccumulable.hh and ProcCounterAccumulable.cc examples.

Best regards,