AthenaExamples

Last update: 23 Aug 2024 [History] [Edit]

AthenaExamples is a series of packages for demonstrating various features of Athena in an uncluttered way. The idea is for each example to demonstrate a single important feature of Athena with minimal distractions. In most cases the examples do not require input data and do not produce output data except simple print statements. The examples can be studied for educational purposes, and also used as templates for new packages.

Detailed information for each of the packages, including running instructions, can be found in the README.md for each package. This page provides a summary for each example and a link to the package in the Athena repository.

Some of these packages need to be updated, denoted ⚠ in the text below.

All of the packages below should run with the latest build of Athena, that is:

setupATLAS 
asetup Athena,main,latest

In principle these packages are all subject to unit tests so issues should be detected quickly, but please report any problems to the core software JIRA tracker (ATLAS members only).

AthExHelloWorld

This is the simplest example available. It does not require input data and produces no output except print statements to the output stream. It demonstrates the basic features of Athena - in particular, algorithms and tools - and how to configure them. The algorithm base class for this package is AthAlgorithm.

AthExBasics

This package contains several example algorithms showing how to configure and run basic operations on data in Athena, including:

  • reading data from a file using ReadHandles, looping over a container of reconstructed objects and extracting information from the objects
  • reading the trigger decision
  • running trigger matching
  • using Athena tools from other packages

The examples all use input AOD data, and by default this is read from a standard test file in EOS. This can be adjusted by the user for performing tests with other data files.

The algorithm base class for this package is AthReentrantAlgorithm so these examples also demonstrate how to ensure code is thread-safe (e.g. via use of std::atomic).

AthExStoreGateExample

This package demonstrates in detail how data should be written to and read from StoreGate, including in a multi-threaded environment.

⚠ This package currently misses a README with running instructions and still uses the old configuration mechanism.

AthExCUDA

This package demonstrates how CUDA code can be integrated into an Athena job and executed on an NVIDIA GPU.

⚠ The README misses information on how to run the example

AthExOnnxRuntime

This package demonstrates how an Athena job can run inference on a trained neural network model encoded in ONNX, via the OnnxRunTime package.

AthExFortranAlgorithm

This package shows how to execute FORTRAN from an Athena algorithm. Note that it is not expected that new code will be written in FORTRAN, but the package demonstrates neatly how non-C++ can be integrated into Athena.

⚠ This package currently misses a README with running instructions and still uses the old configuration mechanism.

AthExMonitored

This package demonstrates the use of the common online/offline Monitored infrastructure.

AthExUnitTest

This package demonstrates how unit tests should be set up for Athena packages.

⚠ This package currently misses a README with running instructions and still uses the old configuration mechanism.