Athena and Ganga

We will now use Ganga to create some Athena jobs on the local batch system.

Setting up Ganga for Athena

In order to run Athena jobs within Ganga, you must run a different script that sets up the GangaAtlas? environment. It is also worth regenerating your .gangarc file to add the Atlas related configuration options to it:

/home/slater/runGanga_Atlas -g

Your previous .gangarc will be stored so you can copy any settings from this to the new one. Now, starting Ganga using the runGanga script will give you access to the Atlas specific additions. To check all is well, do the following:

/home/slater/runGanga_Atlas

help(Athena)
help(ATLASLocalDataset)
help(ATLASOutputDataset)

Hello World Revisited

We will start by running the basic Athena Hello World example from the previous session only this time, using Ganga. The job is set up in a similar way as before, but the application should be changed:

j = Job()
j.application = Athena()
j.application.atlas_release = '14.2.10'
j.application.option_file = '$HOME/Athena/AtlasOffline-14.2.10/run/HelloWorldOptions.py'
j.application.max_events = 10
j.submit()

If you now look at the stdout using the 'peek' method as before, you will see the Athena output that you had previously.

Input and Output datasets

To bring the example more closer to reality, we will now indroduce local input and output data to the job. The datasets we will use are the ATLASLocalDataset? and the ATLASOutputDataset? . As before, have a quick look at the help to get an idea of these objects.

Input Dataset

For the dataset input, we will use 'ATLASLocalDataset'. This should only be used for local jobs (on the batch system or LSF) and not for grid jobs. It gives several ways of specifying the dataset files to run over:

* Directory + wildcard: Supply the directory containing the files and a regular expression for the files you want to include

d.get_dataset(<dir>, <reg_exp>)

* File list: Give a text file that simply lists the complete filenames of the files to run over

d.get_dataset_from_list(<dir>, <reg_exp>)

* Using the 'names' list directly: There is an array within the object that can be added to directly

d.names.append[<filename>]

Athena jobs involving user packages

Now that the you've seen the basic running of Athena through Ganga, we will now move on to the more complicated 'UserAnalysis'

Splitting and Merging Athena Jobs

-- MarkSlater - 10 Dec 2008


This topic: Computing > WebHome > Ganga > OxfordGangaTutorial > OxfordGangaTutorialAtlasSession2
Topic revision: r3 - 14 Dec 2008 - _47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61mark_32slater
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback