An example of batch analysis

One of the jobs that can be submitted in alien is an Analysis job. This job will call aliroot with a macro specified by the user. If you want to see the real code of this command, take a look at the file /alice/bin/Analysis.sh in the catalogue. Therefore, you can analyze any event generated during the productions, or any other file registered in the catalogue. The job will be executed in the place where the data is kept, therefore minimizing the transfer of big files.

To submit one of these jobs, you will have to specify in your jdl:

  • Executable="Analysis.sh";
  • Packages="AliRoot";
  • InputFile="LF:/alice/cern.ch/user/j/jchudoba/AliTPCTracking.C";1
  • Arguments="--macro AliTPCTracking.C ";2
  • InputData={"LF:/alice/simulation/2002-04/V3.08.Rev.01/00001/00100/galice.root", "LF:/alice/simulation/2002-04/V3.08.Rev.01/00001/00100/galiceSDR.root"}3

     

  • OutputFile={"tpc.tracks.root","tpc.clusters.root"};4
  • Email="your.email@address";

 

1This is one of the most important fields. It is the macro created by the user. In case the user has already registered the macro in the catalogue, it will be in the previous format. In case the file is not in the catalogue, it will be like "PF:"

2The arguments that will be passed to aliroot and to your macro.

3The data that is going to be analyzed. Only sites that have a copy of those files will be able to execute the job. All these files will be copied to the working directory of the job.

4The files that have to be saved.

 

For instance:

 

[aliendb.cern.ch:3307] /alice/bin/ > submit &lt &lt EOF
Enter the input for the job (end with EOF)
<b>Executable="Analysis.sh";
Packages="AliRoot";
InputFile="LF:/alice/cern.ch/user/j/jchudoba/AliTPCTracking.C";
Arguments="--macro AliTPCTracking.C ";
InputData={"LF:/alice/simulation/2002-04/V3.08.Rev.01/00001/00100/galice.root",
"LF:/alice/simulation/2002-04/V3.08.Rev.01/00001/00100/galiceSDR.root"};
OutputFile={"tpc.tracks.root","tpc.clusters.root"};
Email="
 pablo.saiz@alien.cern.ch";
EOF</b>
Thanks!!
Sep 10 18:09 info       Submitting job '/Alice/bin/Analysis.sh --macro AliTPCTracking.C '...
Sep 10 18:09 info       Input Box: {galiceSDR.root galice.root AliTPCTracking.C}
Sep 10 18:09 notice     (Re)making connection to ClusterMonitor:pcepalice45.cern.ch:8084
Sep 10 18:10 info       Command submitted!!
[aliendb.cern.ch:3307] /alice/bin/ > top
Sep 10 18:10 notice     (Re)making connection to ClusterMonitor:pcepalice45.cern.ch:8084
JobId  Status          Command name                                    Exechost
66812  QUEUED          /Alice/bin/Analysis.sh                          
 aliprod@pdsflx002.nersc.gov
75492  WAITING         /bin/SaveFile                                                       
75493  RUNNING         /Alice/bin/AliRoot.sh                           
 aliprod@lxplus051.cern.ch
75502  WAITING         /Alice/bin/AliRoot.sh
[aliendb.cern.ch:3307] /alice/bin/ >

Once the job is executed, you get a mail like

 

AliEn-Job 75502 finished with status DONE

You can see the ouput produced by the job in http://alien.cern.ch/Alien/main?task=job&jobID=75502

The job produced the following files: stdout, stderr, tpc.clusters.root, tpc.tracks.root

You can get the output from the AliEn prompt typing:
get /proc/75502/stdout
get /proc/75502/stderr
get /proc/75502/tpc.clusters.root
get /proc/75502/tpc.tracks.root

You can also get the files from the shell prompt typing:

alien --exec get /proc/75502/stdout
alien --exec get /proc/75502/stderr
alien --exec get /proc/75502/tpc.clusters.root
alien --exec get /proc/75502/tpc.tracks.root

Please, make sure to copy any file that you want, since those are temporary files, and will be deleted 
at some point.

If you have any problem, please contact us

And if you execute the commands in the mail, you can get the output:

 

[pcepalice45] ~ > alien --exec get /proc/75502/stdout
Sep 10 19:27 info       Getting the file soap://lxplus051.cern.ch:8084/tmp/AliEn/log/proc/75502/stdo
\ut?URI=ClusterMonitor
And the file is /tmp/AliEn/cache/stdout.10633
[pcepalice45] ~ > cat /tmp/AliEn/cache/stdout.10633
Test: ClusterMonitor is at lxplus051.cern.ch:8084
Execution machine:  lxbatch520.cern.ch
Working Directory is /pool/lsf/aliprod/672990/alien-job-75502
Setting Package AliEn ROOT 3.03.07
...
Executing Analysis with macro AliTPCTracking.C
Arguments 
Constant Field Map1 created: map= 1, factor= 1.000000

WELCOME to ALICE


Processing AliTPCTracking.C()...
...

You are here