Title: ALICE Offline Tutorial
1ALICE Offline Tutorial
- Markus Oldenburg CERN
- Markus.Oldenburg_at_cern.ch
- May 23, 2007 University of São Paulo
2ALICE Offline Tutorial
based on
- F.Carminati, P.Christakoglou, J.F.Grosse-Oetringha
us, P.Hristov, A.Peters, P.Saiz - April 13, 2007 v1.3
3Part V AliEn installation and Setup
available online at http//cern.ch/Oldenburg -gt
Seminars
4Outline
- Installation of the AliEn software.
- Authentication Possible problems.
- General description of the shell
- Basic commands.
- Basic functionalities.
- Working with the file catalogue
- Copying files from/to the catalogue.
- File catalogue structure.
- Querying the file catalogue.
- ROOT API
- News on production.
5Remarks
- Please follow through the tutorial by reading the
pages, first. - Only then, do the things described in the Try it
out sections. - Reason Only the Try it out sections have the
correct commands/directories and right version
numbers, while the explanatory slides might
differ.
6Installation Getting the installer
7Installation Selecting the version
8Installation Reuse of software
9Installation Workspace directory
All the installation log files are stored in this
directory! In case of installation problems
please send the error message along with the
install.log file
10Installation Detecting the platftom
11Installation Supported platforms
12Installation Installation directory
13Installation Selecting installation directory
14Installation Overwriting files
15Installation Selecting packages
16Installation Progress bar
17Installation Final window
18Installation Directory structure
19Installation Try it out
- Download the alien installer from
http//alien.cern.ch. - Make the file executable.
- Run the installer.
- Select v2-13
- Platform should be i686.
- Select installation directory.
- Select the following packages
- Client
- gShell
- ROOT
- xrootd
20ROOT compilation with AliEn support
- If not done already during your local ROOT
installation, you have to enable the AliEn
support in ROOT. - Go to your ROOTSYS directory and modify the
cfg.sh script (see next slide). - Execute the cfg.sh script. This will reconfigure
ROOT. - Recompile ROOT (do make and make map in
ROOTSYS). This will take only a few minutes.
21Root Configuration Example script Put the
following lines in a file called cfg.sh.
!/bin/sh ALIEN_ROOTltprefixgt/alien ./configure
\ --with-pythia6-uscoreSINGLE \
--enable-cern --enable-rfio \
--enable-mathmore --enable-mathcore
--enable-roofit \ --enable-asimage
--enable-minuit2 \ --enable-alien \
--with-alien-incdirALIEN_ROOT/api/include \
--with-alien-libdirALIEN_ROOT/api/lib
The last three lines are the important ones,
which you might have ignored/commented out
during the ROOT installation! Change the second
line (ALIEN_ROOT) to point to your AliEn
installation directory.
22Authentication Preparing the certificates
23Authentication Changes in env. variables
This should be your user name!
24Authentication Getting a GRID proxy
25Authentication Getting an AliEn token
26Authentication Authentication problems I
- Globus related
- Permissions on HOME/.globus/userkey.pem are not
private to the user chmod 400 userkey.pem - Your certificate authority is exotic and not
known to the server. - Your certificate has expired.
- Clock skew
- Your local computer time is in the future with
respect to the server's time. - Your local computer time is more in the past than
the certificate life time.
27Authentication Authentication problems II
- alien-token-init related
- You have not gone through all 5 steps of the
AliEn user registration. - You have not given the AliEn user name as an
argument to the token-init command and your local
user name is not identical to the AliEn user
name. - The script wants to bootstrap the installation
but you don't have write permissions on the
installation path Avoid bootstrapping by
setting the GSHELL_ROOT environment variable.
28Authentication Try it out
- Upload your certificates to your machines
- Store them under e.g /afs/cern.ch/user/ltugt/ltusergt
/.globus/ - Check that the key file is read only.
- Get the setenv.sh file from the agenda (see
below) and place it under e.g. /home/ltusergt/ - Modify it accordingly/
- Source it to set up your environment variables.
- Get a valid grid proxy.
- Get a valid alien token.
- Check the information of your proxy/token by
typing - grid-proxy-info
- alien-token-info
- Agenda http//indico.cern.ch/materialDisplay.py?c
ontribId2ampmaterialId0ampconfId14960
29Shell (1) Accessing the shell
30Shell (1) Basic commands I
Tab completion working!!!
31Shell (1) Basic commands II
32Shell (1) Basic commands III
33Shell (1) whereis command
34Shell (1) Viewing the files I
35Shell (1) Viewing the files II
36Shell (1) Editing files
Define your preferred editor via the variable
EDITOR 'emacs' 'emacs -nw' 'xemacs' 'xemacs
-nw' 'pico' 'vi' (DEFAULT) 'vim' The file is
temporary in /tmp on your local disk and then is
uploaded once you exit the editor!
37Shell (1) Clear old versions
38Shell (1) Try it out
- Access the alien shell.
- Check your user name by typing whoami.
- List the contents of your home directory.
- Check the working directory.
- Create the following directory structure in your
AliEn space - HOME/bin (if it is not there)
- HOME/Tutorial/ESD and HOME/Tutorial/Kine
- HOME/Tutorial/ESD/output and HOME/Tutorial/Kine/
output - Get the information of the file (whereis)
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/A
liAnalysisTaskPt.cxx
39Shell (2) Copying files from/to the F.C.
40Shell (2) File catalogue structure
- The path name will be
- for real data /data/ltYeargt/ltAcceleratorPeriodgt/
ltRunNumbergt/ - for simulated data /sim/ltYeargt/ltProductionTypegt/lt
RunNumbergt/ - Subdirectories will be called
- Raw/
- cond/
- reco/ltPassXgt/ESD/
- reco/ltPassXgt/AOD/
-
- File names will look like this
ltxxxxgt.AliESD.root - For further information see
- http//indico.cern.ch/conferenceDisplay.py?confId
3280 - http//cern.ch/Oldenburg/MetaData/MetaData.doc
MARKUS OLDENBURG AN INTERNAL NOTE IS ON THE WAY
41Shell (2) Querying the F.C. I
alienshalice 1 find -x pp /alice/cern.ch/use
r/p/pchrista/production/pp/PDC06/ AliESDs.root
gt pp.xml
Redirect the output to the xml collection.
42Shell (2) Querying the F.C. II
alienshalice 1 find -x pp /alice/data/2008/L
HC08a//reco/Pass3/ AliESDs.root
Runcollision_systempp and Runstoplt"2008-03-
20 102033" and Runstartgt"2008-03-19" gt pp.xml
43Shell (2) Try it out I
- Create the following directory structure locally
- HOME/AliEn/PDC06/001 and HOME/AliEn/PDC06/002
- HOME/AliEn/Tags
- HOME/AliEn/Local/ESD and HOME/AliEn/Local/Kine
- HOME/AliEn/Interactive/ESD and
HOME/AliEn/Interactive/Kine - HOME/AliEn/Batch
- Copy all the files under the AliEn directory
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/
to your local HOME/AliEn/Local/ESD - ESD.par - ANALYSIS.par - AliAnalysisTaskPt.h -
AliAnalysisTaskPt.cxx - runESDAnalysis.C -
demoLocal.C
44Shell (2) Try it out II
- Copy all the AliEn files under /alice/cern.ch/user
/p/pchrist/Tutorial/LOCAL/Kine/ to your local
HOME/AliEn/Local/Kine - AliAnalysisTaskRLPt.h - AliAnalysisTaskRLPt.cxx -
runKineAnalysis.C - demoLocal.C - Copy all the AliEn files under /alice/cern.ch/user
/p/pchrist/Tutorial/TAGS/ to your local
HOME/AliEn/Tags - ESD.par - CreateTags.C - runTagCreator.C
- Copy all the root files under /alice/cern.ch/user/
p/pchrist/Tutorial/PDC06/001/ and
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/002/
your local HOME/AliEn/PDC06/001 and
HOME/AliEn/PDC06/002
45Shell (2) Try it out III
- Query the f.c. and get all the tag files
(.tag.root) under /alice/cern.ch/user/p/pchrist/
Tutorial/PDC06/ - Get the output on your terminal.
- Redirect the results to the tag10.xml collection
the output will not be stored in your AliEn
working directory but rather in your local
working directory. - Repeat the previous exercise limiting the number
of output files to 5 (find -l 5 ...). - Query the f.c. for all the Merged.tag.root
files under /alice/cern.ch/user/p/pchrist/Tutoria
l/PDC06/ and redirect the result to the tag.xml
file. - Exit the shell and copy the xml to your local
HOME/AliEn/Interactive/ESD and
HOME/AliEn/Interactive/Kine.
46Production status ( available data)
- pp min bias _at_ 14TeV --- NEvents 50M
- /alice/cern.ch/user/a/aliprod/prod2006_2/output_pp
/ (5.4M) - /alice/sim/2006/pp_minbias/ (45M)
- /alice/sim/2006/pp_x_vertex_1cm/ (1.1M)
- /alice/sim/2006/pp_x_vertex_05cm/ (1.1M)
- /alice/sim/2006/pp_minbias_full/ (1.1M)
- All RUNS have been tested and merged tag files
have been produced at the RUN level for all
RunIds. - pp min bias _at_ 900GeV --- NEvents 200K
- /alice/sim/2006/pp_900GeV/
- All RUNS have been tested and merged tag files
have been produced at the RUN level for all
RunIds. - Muon events --- NEvents 864K
- /alice/sim/2006/muon/ (64K)
- /alice/sim/2006/muon_signle/ (800K)
47ROOT ROOT API
48ROOT - Connecting
49ROOT Accessing a GRID file
50ROOT Problems with gcc versions
- AliEn software comes with a precompiled library
with gcc 3.2.3 which is also shipped with AliEn. - In the latest AliEn version 2.13 it will check
automatically for the correct versions (and
recompile if necessary). The following steps are
not necessary in this case. - Otherwise if you are using a different version
of gcc (check it with gcc v) then do the
following - cd ALIEN/api/src
- ./recompile.gapi
- cd ALIEN/api/lib
- Copy all the libgapiUI.so.2 files to the
libgapiUI.so.3 - Or link your gcc to the version shipped with
AliEn and compile everything with this.
51ROOT Try it out
- Get the alienroot and alienaliroot executables
from indico ( the agenda, see slide 28). - Store them under your /home/ltusernamegt/bin
- Open the setenv.sh file, use it in your own
.bashrc (or wherever you set your environment). - You might want to modify the path definition
- export PATHPATHALIEN/api/binALIEN/globus/bin
/home/ltusernamegt/bin - Once finished, get a token, type alienroot and
then - root 0 TGridConnect(alien//)
- If it works without error messages you have
installed everything successfully. If not then go
back to the previous pages of this tutorial.
52BACKUP
53ROOT Try it out I
- Go to your ROOTSYS and change the cfg.sh file
change the location where you installed the grid
software (it should be e.g. /home/trn2301/alice/Al
iEn). - Source the script and then type make and make
map. - Write the following script, name it alienroot,
make it executable, place it in your HOME/bin
directory and add it in your PATH.
!/bin/bash export ALIEN/home/trn2301/alien expor
t ROOTSYS/home/trn2301/root export
PATHROOTSYS/binPATH export LD_LIBRARY_PATHRO
OTSYS/libLD_LIBRARY_PATHALIEN/api/lib if
-e /tmp/gclient_env_UID then source
/tmp/gclient_env_UID root.exe fi
54- AliEn Tutorial
- Solutions
- Panos Christakoglou
- University of Athens - CERN
55Installation Try it out
- For the solutions, we assume that the user name
is trn2301 with the following attributes - Local home directory /home/trn2301
- Alien home directory /alice/cern.ch/user/t/trn23
01 - change the names accordingly to match your case!!!
1. Download the installer from the web bash
wget http//alien.cern.ch/alien-installer 2.
Make the file executable bash chmod ax
alien-installer 3. Run the installer bash
./alien-installer
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file
56Authentication Try it out
1. Upload your certificates to your
machines bash scp -r ltusernamegt_at_lxplus.cern.ch
/.globus . 2. Get a valid token bash
alien-token-init trn2301 //the username is
optional and should be put if the local username
isn't the same as the alien one 3. Get your
proxy info bash grid-proxy-info 4. Get your
token info bash alien-token-info
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file
57Shell (1) Try it out
1. Access the shell bash aliensh 2. Check
your user name aliensh whoami 3. List the
contents of your alien directory aliensh
ls 4. Check the alien working direcory aliensh
pwd 5. Create the following directory structure
in your AliEn space HOME/bin (if it is not
there) - HOME/Tutorial/ESD and
HOME/Tutorial/Kine -HOME/Tutorial/ESD/output
and HOME/Tutorial/Kine/output aliensh mkdir
-p bin Tutorial/ESD/output Tutorial/Kine/output 6
. Get the information of the file
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/A
liAnalysisTaskPt.cxx aliensh whereis
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/A
liAnalysisTaskPt.cxx
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file
58Shell (2) Try it out I
1. Create the following directory structure
locally HOME/AliEn/PDC06/001 and
HOME/AliEn/PDC06/002 - HOME/AliEn/Tags -
HOME/AliEn/Local/ESD and HOME/AliEn/Local/Kine
- HOME/AliEn/Interactive/ESD and
HOME/AliEn/Interactive/Kine - HOME/AliEn/Batch
bash mkdir -p HOME/AliEn/PDC06/001
HOME/AliEn/PDC06/002 HOME/AliEn/Tags
HOME/AliEn/Local/ESD HOME/AliEn/Local/Kine
HOME/AliEn/Interactive/ESD HOME/AliEn/Interactiv
e/Kine HOME/AliEn/Batch 2. Copy all the files
under the AliEn directory /alice/cern.ch/user/p/pc
hrist/Tutorial/LOCAL/ESD/ to your local
HOME/AliEn/Local/ESD aliensh cp
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/ESD/
file/home/trn2301/AliEn/Local/
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file
59Shell (2) Try it out II
- 3. Copy all the AliEn files under
/alice/cern.ch/user/p/pchrist/Tutorial/LOCAL/Kine/
to your local HOME/AliEn/Local/Kine - aliensh cp /alice/cern.ch/user/p/pchrist/Tutori
al/LOCAL/Kine/ file/home/trn2301/AliEn/Local/ - 4. Copy all the AliEn files under
/alice/cern.ch/user/p/pchrist/Tutorial/TAGS/ to
your local HOME/AliEn/Tags - aliensh cp /alice/cern.ch/user/p/pchrist/Tutori
al/TAGS/ file/home/trn2301/AliEn/ - 5. Copy all the root files under
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/001/
and /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/0
02/ your local HOME/AliEn/PDC06/001 and
HOME/AliEn/PDC06/002 - aliensh cp /alice/cern.ch/user/p/pchrist/Tutori
al/PDC06/001/ file/home/trn2301/AliEn/PDC06/ - aliensh cp /alice/cern.ch/user/p/pchrist/Tutori
al/PDC06/002/ file/home/trn2301/AliEn/PDC06/
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file
60Shell (2) Try it out III
7. Query the f.c. and get all the tag files
(.tag.root) under /alice/cern.ch/user/p/pchrist/
Tutorial/PDC06/ aliensh find -x tag
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/
tag.root (Get the output on your
terminal) aliensh find -x tag
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/
tag.root gt tag10.xml (Redirect the results to
the tag10.xml collection) 8. Repeat the previous
exercise limiting the number of output files to 5
(find -l 5 ...). aliensh find -l 5 -x tag
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/
tag.root gt tag10.xml 9. Query the f.c. for all
the Merged.tag.root files under
/alice/cern.ch/user/p/pchrist/Tutorial/PDC06/ and
redirect the result to the tag.xml
file. aliensh find -x tag /alice/cern.ch/user/p
/pchrist/Tutorial/PDC06/ Mergedtag.root gt
tag.xml 10. Exit the shell and copy the xml to
your local HOME/AliEn/Interactive/ESD and
HOME/AliEn/Interactive/Kine. aliensh
exit bash cp tag.xml HOME/AliEn/Interactive/ES
D bash cp tag.xml HOME/AliEn/Interactive/Kine
bash --gt Your local bash shell aliensh --gt
Your alien bash shell No notation --gt inside a
file