Dear Root users,
I am using GATE (an open source software dedicated to digital simulations in medical imaging and radiotherapy) to analyze some radio physical quantities (photo-electrons for example) after an X-rays irradiation simulation. I’m using root 6.28/08 on Ubuntu 20.04.6 LTS.
My GATE simulations give rise to .root files in which I can found the number of photo-electrons produced.
I know how to recover this number “by hand” in the T Browser :
or through the root prompt :
But I would like to make a root macro that goes through each root files, recover and copy the number of photo-electrons produced for each root file into an ods or csv file.
I know how to open my root file :
std::unique_ptr myFile( TFile::Open(“phaseSpaceCluster_IN.root”) );
but I can’t manage to find how to retrieve the number of photo-electrons…
In other words, how can I implement the root prompt command line
into a root macro ? Does anyone have any tips to help me?
Many thanks for your help!