Question about creating macros

I am reading ROOT Primer from official cite.
In paragraph ROOT as function plotter slits.C macro is used , when I try to type root slits.C in the shell, it says no such file found

Warning in TApplication::GetOptions: macro slits.C not found
root: unrecognized option ‘slits.C’
Try ‘root --help’ for more information.

On the same page, a link to the github with the macros used in this tutorial was attached, I found the necessary file, but I don’t know where to save it so that ROOT finds it

Run ROOT from the same folder where you put the macros, any folder in which you have read and write permissions.

1 Like