I’m using #include “g4root.hh” and calling man->OpenFile(“output.root”);, but I’m unable to visualize the data in ROOT because the output.root file is not being created. Could someone help? Are there any recent changes in Geant4 affecting g4root?
@HasanGhotme, I assume you do so inside your BeginOfRunAction. After that you should write and close the ROOT file in your EndOfRunAction. Something like this:
void MyRunAction::EndOfRunAction(const G4Run*)
{
// Inicializes an instance of the AnalysisManager
G4AnalysisManager *man = G4AnalysisManager::Instance();
// Writes data in the Tuples at the end of the run
// and closes the output file
man->Write();
man->CloseFile();
}