--- /dev/null
+1. run.C is the main macro to use. It takes as an argument the raw-data run number to be reconstructed.
+ Note: don't forget to change the username there.
+
+2. rec.C is called from run.C and does:
+*) raw-data input is set to all the raw-data files from the run (rec.SetInput("raw://runXXX"))
+*) QA is switched off due to high memory consumption, it can enabled in case one reconstructs less detectors.
+*) rec.SetEventRange() is used to limit the time of the query. Can be changed according to the needs.
+*) Output is a dataset, which one can setup by rec.SetOutput. The syntax is simple, just follow the example
+and put a coma separated list of output root file just between the first : and @. For example one case do:
+
+root_archive.zip#AliESDs.root:AliESDs.root,AliESDfriends.root,MUON.RecPoints.root@dataset://runXXX
+
+wildcards should work, but better define explicit names.
+The output is a normal CAF dataset (as the one staged from the grid).
+
+3. prepareAlienCollection.sh is a helper script in case the run is long and one wants to select a subset
+of files to bre reconstructed. The syntax is:
+
+./prepareAliEnCollection.sh XXX XXX.txt
+
+Then rec.C should be changed, so that the input becomes 'collection://XXX.txt'.
+ Note: alien-token-init should be in the path.
+
+4. rec.sh is a simple shell script which takes the run number as an argument and calls
+'aliroot run.C'
--- /dev/null
+#!/bin/sh
+#############################################################################
+# prepareCollection.sh. Script to prepare a raw-data chunks collection
+# for a given run
+# Usage:
+# ./prepareCollection.sh <run_number> <collection_file>
+#############################################################################
+#
+# modification history
+# version 1.0 2008/09/12 Cvetan Cheshkov
+
+# SET THE FOLLOWING PARAMETERS IF NEEDED:
+# ---------------------------------------
+YEAR=09
+# ---------------------------------------
+
+RUNNUM=$1
+
+[ -z $RUNNUM ] && { echo "Please provide a run number..."; exit 1; }
+
+OUTFILE=$2
+
+[ -z $OUTFILE ] && { echo "Please provide an output filename..."; exit 1; }
+
+[ ! -e "$HOME/.globus/usercert.pem" ] && { echo "FAILED: There is no certificate in $HOME/.globus"; exit 1; }
+
+[ -e "/tmp/gclient_env_$UID" ] && { source /tmp/gclient_env_$UID; }
+alien-token-init
+
+[ ! "$?" -eq "0" ] && { echo "FAILED: Token creation failed"; exit 1; }
+
+# Retrieve the list of chunks from AliEn.......
+BASEDIR="/alice/data/20"$YEAR
+PATTERN="/raw/"$YEAR"0000"$RUNNUM"*0.root"
+rm -f collection.tmp
+gbbox find $BASEDIR $PATTERN | grep -v found | head --lines=-1 > collection.tmp
+
+[ $(stat -c%s collection.tmp) -eq 0 ] && { echo "No chunks found for the given run"; exit 1; }
+
+rm -f $OUTFILE
+for ifile in `cat collection.tmp` ; do echo "alien://$ifile" >> $OUTFILE 2>&1; done
+rm -f collection.tmp
+
+echo `cat $OUTFILE | wc -l`" raw-data chunks are found and added to the collection file "$OUTFILE;
+
--- /dev/null
+void rec(Int_t runNumber)\r
+{\r
+ gSystem->Load("libRAliEn.so");\r
+ gSystem->Load("libNet.so");\r
+\r
+ // Set the CDB storage location\r
+ AliCDBManager * man = AliCDBManager::Instance();\r
+ man->SetDefaultStorage("raw://");\r
+ \r
+ // Reconstruction settings\r
+ AliReconstruction rec;\r
+\r
+ // QA options\r
+ rec.SetRunQA(":") ;\r
+ rec.SetRunGlobalQA(kFALSE);\r
+ rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;\r
+\r
+ // AliReconstruction settings\r
+ rec.SetWriteESDfriend(kTRUE);\r
+ rec.SetWriteAlignmentData();\r
+ rec.SetInput(Form("raw://run%d",runNumber));\r
+ rec.SetRunReconstruction("ALL -HLT");\r
+ rec.SetUseTrackingErrorsForAlignment("ITS");\r
+\r
+ rec.SetEventRange(0,10000);\r
+\r
+ // switch off cleanESD\r
+ rec.SetCleanESD(kFALSE);\r
+\r
+ rec.SetOutput(Form("root_archive.zip#AliESDs.root:AliESDs.root,AliESDfriends.root@dataset://run%d",runNumber));\r
+\r
+ rec.Run();\r
+}\r
--- /dev/null
+#!/bin/bash
+
+[ -z $1 ] && { echo "Usage: rec.sh <run_number>"; exit 1; }
+
+aliroot -q run.C\($1\)
--- /dev/null
+void run(Int_t runNumber)
+{
+ gEnv->SetValue("XSec.GSI.DelegProxy","2");
+ // Select ROOT version
+ TProof::Mgr("XXX@alicecaf")->SetROOTVersion("v5-24-00b-caf_dbg");
+ // Login to CAF
+ TProof::Open("XXX@alicecaf");
+
+ // Enable AliRoot
+ gProof->UploadPackage("/afs/cern.ch/alice/caf/sw/ALICE/PARs/v4-17-Release.rec/AF-v4-17-rec.par");
+ gProof->EnablePackage("AF-v4-17-rec.par");
+
+ // Run reconstruction
+ gROOT->LoadMacro("rec.C");
+ gROOT->ProcessLine(Form("rec(%d);",runNumber));
+
+ TProof::Mgr("XXX@alicecaf")->GetSessionLogs()->Save("*",Form("run%d.log",runNumber));
+
+ // Check the produced dataset
+ TFileCollection *coll = gProof->GetDataSet(Form("run%d",runNumber));
+ if (coll) {
+ Int_t nEvents = coll->GetTotalEntries("/esdTree");
+ if (nEvents > 0) {
+ cout << "===========================================================================" << endl;
+ cout << nEvents << " events reconstructed and stored in the dataset run" << runNumber << endl;
+ cout << "===========================================================================" << endl;
+ cout << "The dataset is:" << endl;
+ coll->Print();
+ cout << "===========================================================================" << endl;
+ }
+ }
+}