Hi, I am running Pol01 example, and I need the histograms to be saved as branches inside a root tree. I made some adjustments in RunAction.cc and RunAction.hh (see attached).
I can see the tree and the branches I’ve created, but no data stored.
_Operating System: MacOs
RunAction.cc (13.3 KB)
RunAction.hh (4.0 KB)
without knowing the example by heart. Are you sure, you are putting anything into those tuples?
Also, it is unclear whether the histograms are saved but they have no entries. They are two completely different issues. If they are empty maybe you are not filling them correctly either. In case they don’t even show up… I don’t know. The “Write()” method should take care of that.
RunAction::BookHisto(), you inactivate all histograms on the line #186:
If you want to get your histograms filled, you need to set their activation to
true. In Geant4 examples, this is usually done in a run macro.