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.
Major design principles that influenced the development of Athena were:
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.
|
A Sequencer is a sequence of Algorithms, each of which might itself be another Sequencer, allowing for a tree structure of processing elements. A filter Algorithm can indicate that the event being processed fails to meet its filter criteria and inhibit the processing of downstream Algorithms.
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.
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.
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.
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 .
Copyright © CERN 2005