Computing Technical Design Report

3.3 The Athena Framework

3.3.1 Introduction

The Athena framework [3-2] is an enhanced version of the Gaudi framework [3-3] that was originally developed by the LHCb experiment [3-4], but is now a common ATLAS-LHCb project and is in use by several other experiments including GLAST and HARP. Athena and Gaudi are concrete realizations of a component-based architecture (also called Gaudi) which was designed for a wide range of physics data-processing applications. The fact that it is component-based has allowed flexibility in developing both a range of shared components and, where appropriate, components that are specific to the particular experiment and better meet its particular requirements.

3.3.1.1 Design Principles

Major design principles that influenced the development of Athena were:

3.3.1.2 Major Component Abstractions

The major components that have been identified within the architecture are shown in Figure 3-1. This shows component instances and their relationships in terms of navigability and usage.


Figure 3-1 Athena Component Model

 

Major components are:

3.3.1.3 Concrete Athena Services

One of the strengths of a common architecture is the accumulation of services useful to developers of algorithmic code. To start with, the Athena developer has available an array of core "system" services for job configuration, message logging, error handling, job tracing, performance monitoring and resource management.

ConeJets.ConeFinder.ConeR = 0.7

    Default values are set in the Algorithm, Tool or Service itself.

  1. Logging and Error-handling . The MessageSvc controls the output of messages sent by the developers using a MsgStream. The developer specifies the source of the message (its name) and the message verbosity level. The MessageSvc can be configured (using the JobOptionSvc) to filter out messages coming from certain sources or having a high verbosity level. Future implementations of MessageSvc are expected to log messages to a production or online database and to send critical error messages also to the (production or DAQ) operator console.
  2. When an Algorithm throws an Exception during the execute phase, it is caught and passed on to the Exception Service, which allows the users to manipulate the outcome. The service can be configured via job options to change the meaning of an exception from a failure to a success or recoverable error, to the status code of an associated GaudiException, or to re-throw the exception to a lower level, on a per-Algorithm or global basis.

  3. Performance and Resource Monitoring . The AuditorSvc and the ChronoStatSvc manage and report the results of a number of Auditor objects, providing statistics on the CPU and memory usage (including potential memory leaks) of Algorithms and Services. A TimeKeeper service monitors the remaining CPU time available to a job running in batch and terminates the job when it estimates that there is not enough time left to process a new event.

In addition to these generic tools, Athena provides many domain-specific tools, to record data-processing history, manage event and detector data, manage random-number generation, histogramming and n-tuples, and provide access to PDG [3-5] particle properties.

3.3.1.4 Scripting

There are two primary motivations for scripting within the Athena framework. The first is for configuration, taking advantage of the component architecture to build applications that are tailored for particular capabilities from a pool of available components. Thus the configuration should be able to specify the set of Algorithms and Services that are to be used, modify their behaviour by specifying overrides to the default Property settings, and specify any needed input or output files.

The second motivation is to provide support for interactivity, allowing the user to modify a static configuration and allow for rapid feedback from changes to, for example, tracking road widths, p T thresholds and rapidly reprocessing a set of events so as to optimize the configuration for a later job over a larger event sample.

Athena uses a common scripting language, Python [3-9], for both the configuration and interactivity roles. So-called "Python bindings" are provided to its core abstractions, in particular the application manager, services, algorithms, histogramming, data store, etc. Scripting provides support not only for configuration and interactive use, but also for steering/control and interoperability with alternative front-ends to Athena. (The latter are not described further here.)

Python is a popular, open-source, dynamic language with an interactive interpreter. Like C++, Python is a multi-paradigm language and provides such concepts as modules, classes, exceptions and very high-level dynamic data types, etc. There are interfaces to most system calls, a large set of standard libraries, and bindings to many existing third-party applications and libraries. Initial scripting support for Athena was provided by an implementation of a Python scripting service conforming to the IRunable Service component abstraction. However, initial experience indicated that greater flexibility could be had by complementing this with a Python script that starts and runs the Athena Application Manager directly, using Python bindings to the core Athena abstractions.

Athena jobs are configured by specifying the set of Algorithms, Services, and other components to be used, as well as their Properties. This is done through the scripting interface, which transports the settings to the appropriate Athena components, or provides place-holders until the components are available. Since Python is a complete programming environment, end-users and package providers can write higher level interfaces on top of the Athena configuration facilities. This is often done to provide (semi-)automatic configuration based on a couple of basic, or initial settings.

The main Athena Python control script is simply a user interface on top of a set of scripts and modules that provide a programming interface at a more abstract level of steering than do the Athena component interfaces. It parses user command-line options, loops over configuration files, and sets some common defaults. The scripts/modules, all written in Python, with the code that performs the actual work, such as reading the configuration files, responding to settings, etc., are used in conjunction with other main Athena programs as well (in particular athena.C, and athenaMT).

The scripting facilities support interactive use of Athena; once the Python prompt has been reached, typically upon completion of the initial application configuration, actual instances of the components can be accessed, thus allowing their properties to be examined and modified. New components, possibly written in Python, can be loaded and configured, objects in the transient data store can be examined and their data can be plotted, and the event processing loop can be run completely in Python. New functionality can be built on top of the interactive layer, using third-party packages or parts of the Python standard libraries (e.g. the Python SimpleXMLRPCServer). An interactive physics analysis environment based on Python is under development.


1. StoreGate is described in Section 3.4.2 .



4 July 2005 - WebMaster

Copyright © CERN 2005