Problems for analysisManager and csv files

Hi,

So this might be a simple problem (I hope) but it is in consistent which is why I’m having an issue tackling it.

I’m using the analysis manager to build 1D, 2D and 3D histograms, which I output in the form of a csv.

Run Action example:
G4String H2_0 = “2D hist”;
analysisManager->CreateH2(H2_0,H2_0,400,0,4mm,200,-4mm,0*mm);

Sensitive Detector example:
analysisManager->FillH2(0,Bin_Parameter1,Bin_Parameter2);

Sometimes my output cuts early. So the length of my output is not the same as the length of the two bin parameters multiplied together.

Sometimes I get random binary symbols that fill a row in my csv

And sometimes the row does not fully output, for example it may look like this:
,0,0,

I’m not sure as to why this happens. There doesn’t seem to be any pattern to when it will error like the above exmaples.

I hope you can help.

Dean