Write mesh scores in same output file

hello,
when i write scores in output file i get lines like the following one.
0,0,0,1.254337085985352,0.1302793449831489,131
my question is how to get only score quantity in output file like this:
141
122
455
154
out.txt (1.0 KB)

If you want to change the format of the scorer output, you need to implement your own ScoreWriter derived from G4VScoreWriter base class and set it to G4ScoringManager. Refer to RE03 example.
https://geant4.kek.jp/lxr/source/examples/extended/runAndEvent/RE03/