Running a ROOT macro in the batch queue

I’m looking to run a macro under the batch queue. I have a macro that runs over some data, let’s call it myMacro.C, and another macro which starts that macro in a root session, myMacroRun.C. So in an interactive session, I’d normally type:

[filepath]$ root -l
root[0] .x myMacroRun.C

Alternatively I could write “root -b -q myMacroRun.C >&! myMacro.log &” to have it running as a background process.

I’m going to be running over lots of data, though, so the batch queue would be ideal. I need to submit a batch script using qsub, but I’m unsure what the exact contents of this script should be. More specifically, I don’t know exactly how I should be calling the root software. Can anyone offer any tips?


I do not have any experience with qsub.
May be that’s a question for some “qsub forum” ?

I use root macros with qsub.
Usually I root macro wit parameter (usally name of my file with data). So I just wriote bash script that:
a) generate many scritps, each script running same macro but with different parameter
b) each script I send by qsub - one script one job

I also had to use a qsub queue to run my ROOT macros. I also ended up writing a small rat’s nest of bash scripts to set all the command-line parameters (with lots of quotes and escape characters). If you want, I can send you the shell scripts I use so you can see the style, but I don’t think they are very good examples to follow.