Can't output energy deposits

Please fill out the following information to help in answering your question, and also see [tips for posting code snippets]. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.2.1
_Operating System:_GNU ld (GNU Binutils) 2.37
_Compiler/Version:_11.2.0
_CMake Version:_GNU Make 4.3


Run.cc (1.1 KB)

Run.hh (605 Bytes)

I am a newer in Geant4 and recently I tried to build a project to Simulate the energy deposition of photons hitting the thin plate, but when I used the function “AddEdep” and tried to output the energy deposition, there
is a segmentation fault. But I don’t know why. I trust that it’s the reason for “run.cc” or “run.hh”