Can't save a root macro for analyzing trees on /eos (directory is write-protected)

Hi,

I want to write a root macro that reads from a .root DSID file on /eos. I tried running a macro that doesn’t exist to see what directory macros are executed from, which is /usr/share/root/macros. So, I wrote a macro and tried to save it in that directory, but it said the directory is write-protected, and I couldn’t save in that directory. How can I write a macro that can be used to analyze .root files on /eos?

Thanks

You don’t need to save your macros in specific directories, you can run your macros from anywhere with

$ root macro.C

where macro.C is a macro file you wrote. You can also pass parameters to your macro, but I recommend you to start with a simple macro that takes no parameters. You can also load a macro from within root like this:

$ root -l
root [0] .x macro.C

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.