What is AIDA?

AIDA is a standard set of interfaces for creating and manipulating histograms, n-tuples and related data analysis objects. It has been created cooperatively by a group of developers working on high-energy physics data analysis tools. The goal of the AIDA project is to provide the user with a powerful set of interfaces which can be used regardless of which analysis tool they are using. The advantages of this approach are that:

  1. The user will only need to learn one set of interfaces even if they use more than one tool.
  2. By pooling the experiences of several different development teams we will be able to develop a more complete solution to the data analysis problem.
  3. Different analysis tools built using AIDA will be able to interoperate, for example by exchanging objects in a common storage format (initially XML).

Currently two versions of the AIDA interfaces exist, one for Java and one for C++. The two interfaces are as identical as the underlying languages will permit.

We have been careful to avoid using a "lowest common denominator" approach in the development of the AIDA interfaces. Rather than limiting ourselves by the existing capabilities of the underlying analysis tools, we have designed a rich set of interfaces, with the expectation that the tool developers will need to add new features to support the full AIDA functionality. This does mean however that the early implementations of AIDA may not completely implement all features.

An Example AIDA Program

Before going into details, here is a trivial example program that uses the AIDA interfaces to create a 1D histogram, and display it.

import hep.aida.*;
import java.util.Random;

public class Histogram 
   public static void main(String[] argv)
      IAnalysisFactory af = IAnalysisFactory.create();
      IHistogramFactory hf = af.createHistogramFactory(af.createTreeFactory().create());
      IHistogram1D h1d = hf.createHistogram1D("test 1d",50,-3,3);
      IHistogram2D h2d = hf.createHistogram2D("test 2d",50,-3,3,50,-3,3);
      Random r = new Random();
      for (int i=0; i<10000; i++) 
      IPlotter plotter = af.createPlotterFactory().create("Plot");

A few things to notice in this example, first note that AIDA objects are always created from factories. Although different implementations of AIDA may return different objects from their factories, the returned objects will all implement the same standard AIDA interfaces. In this way it is possible to change from one AIDA implementation to another just by changing which IAnalysisFactory is used.

Overview of AIDA Classes

The rest of this document describes the key features that the AIDA user will need to know about:


In AIDA instead of creating objects directly using "new" one uses factories. There is one "master" factory, IAnalysisFactory from which other factories are obtained. The IAnalysisFactory allows you to obtain factories for creating trees (ITreeFactory), histograms, clouds and profile histograms (IHistogramFactory), tuples (ITupleFactory) etc.

You will see many examples of using factories in the remainder of this guide.

Table of Contents -- Next Section

$Id: factories.jsp,v 1.1 2006/03/09 18:22:09 turri Exp $