I have created Root file (M1.root) as output using geant4 code
I want to open and see the output in this file but I do not know how to do so
as I have low background in programming .
I have tried to open it as root form the terminal and I got ,
in command .ls I got this information
there are several ways to increase your level of ROOT expertise, from root.cern.ch/courses .
For quick answers, you can consult root.cern.ch/howtos , in particular, the answer to your question is in this howto: “How to Read Objects from a File?”.
TFile inputFile ("inputFile.root");
TH1F* h = nullptr;
inputFile.GetObject("myHisto",h);
or in Python
inputFile = ROOT.TFile("inputFile.root")
h = inputFile.myHisto
or at the prompt
root inputFile.root
root [0] myHisto.Draw()
or if you don’t even want to open the prompt, in your shell: