ROOT and HTCondor


I’ve got 20 .root files and normally I loop over all of them in my script.cxx and it takes successively all root files.
Now I want my script to run simultaneously for all 20 files. This is why I read the CERN Batch Service User Guide, but I still have a problem.

First of all, I made a file, in which I wrote the commands I used to execute in the shell (e.g root -l, .L myclass.C, .x myscript.cxx). Then I made the .sub file, which has only two entries: The executable file ( and the log file, because I don’t have any (input or) output since I only want to save histograms.

My problem is now, that I want to to run my script 20 times, simultaneously, for each root file I have.
Or more precisely: If I write in the .sub file queue 20 at the end, the job should be done 20 times simultaneously? Then my problem is, that a root file can’t be a variable. that I give the function in my script.cxx?

And my root files are named like file01.root, file02.root,…,file20.root, so I can’t just do
Input = rootfile$(ProcId).root …

Maybe this is quite simple and I just don’t get it, but yesterday I’ve looked into this the first time and I don’t found an answer to my problem yet, so I hope that somebody here could help me.

Best regards

Hi Eneb,

I think you can take advantage of passing arguments to your macro, in this case the name of the file to process. Here you can find more info: Passing arguments to a macro


Thank you. I think this could work for me, I’ll try it out :slight_smile:

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