Running your algorithm

Last update: 29 Jun 2023 [History] [Edit]

Now that you have written the file to configure your algorithm, it is time to run it

Running your job in EventLoop

To execute the job using this script, go to your run directory, and execute your macro with the command: --submission-dir=submitDir


If your algorithm does not run, there could be an issue with the “Shebang” line in your steering macro. You can just override this and directly run with python using python ../build/x86_64-centos7-gcc8-opt/bin/ --submission-dir=submitDir.

tip While you are in principle free where you put your submitDir, avoid putting them into the source directory, as that is usually version controlled and you risk your data files being added to the repository (which is bad). Also avoid putting them into the build directory, as you often want to keep the contents of submitDir around, while the build directory should only contain files you don’t mind losing. Putting it inside the run directory is a reasonable choice if you have enough space there, but if it ends up containing large files you may need to put it onto a separate data disk. If you run in batch you may also need to put it inside a directory that is accessible from the worker nodes.

Running your job in Athena (optional)

Go to your run directory and execute your jobOptions with Athena using the following command:

athena MyAnalysis/

tip You can override many of the options specified in the jobOptions when calling the athena command. For example, you can set the number of events to process with the --evtMax option (-1 is the default value and causes all events to be processed):

athena MyAnalysis/ --evtMax=-1 

Or you can override the input files used with the --filesInput option:

athena MyAnalysis/ --filesInput=another.file.root 

⭐️ Bonus Exercise

  • Create a second instance of your algorithm (with a different name) and add it to the job. Can you see if the two algorithms are running in series or in parallel?