]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/CalibMacros/CPass1/test/mergeMakeOCDBUser.sh
cope with the new CalibObjects.root file structure (TPC calib in TDirectories)
[u/mrichter/AliRoot.git] / PWGPP / CalibMacros / CPass1 / test / mergeMakeOCDBUser.sh
CommitLineData
054d9070 1# Script for testing of the mergemakeOCDB on the grid for user purposes
2# To be used in case the standard production failed or was not automatically validated
3# Output objects are writn to the predefined path:
4
5#
6# Parameters for macro:
7# 1 - alien user dir name - e.g /m/miranov/
8# 2 - input directory with data to merge - e.g /alice/data/2011/LHC11h/000169926/cpass0_HLT/
9# 3 - run number - e.g run number 169926
10# 4 - OCDB output path - alien://folder=/alice/cern.ch/user/m/miranov/CPass1/169926
11# Example:
12# run=170572
13# AlienName=/m/miranov/
14# $ALICE_ROOT/PWGPP/CalibMacros/CPass1/test/mergeMakeOCDBUser.sh $AlienName /alice/data/2011/LHC11h/000$Run/cpass0_HLT/ $Run alien://folder=/alice/cern.ch/user/m/miranov/CPass1/$Run
15#
16# authors: marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch
17
18AlienName=$1
19InputDataDir=$2
20Run=$3
21OCDBPath=$4
22InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
23
24echo xxxxxxxxxxxxxxxxxxxxxxxxxx
25echo SETUP
26echo AlienName=$1
27echo InputDataDir=$2
28echo Run=$3
29echo OCDBPath=$4
30echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
31echo xxxxxxxxxxxxxxxxxxxxxxxxxx
32
33#
34# 1. copy macroses and sh to the predefiend alien directory
35#
36OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
37alien_mkdir -p $OutputMacros
38
39for lfile in `ls $InputMacros/{*C,*sh,*jdl} | grep -v AddTask`; do
40 bname=`basename $lfile`
41 echo Copping alien_cp -n $lfile alien://$OutputMacros/$bname
42 alien_cp -n $lfile alien://$OutputMacros/$bname
43done
44#
45# 2. Copy shell script and jdl
46#
47OutputBin=`echo /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
48echo alien_cp -n $InputMacros/mergeMakeOCDB.sh alien://$OutputBin/mergeMakeOCDB.sh
49alien_cp -n $InputMacros/mergeMakeOCDB.sh alien://$OutputBin/mergeMakeOCDB.sh
50cat $InputMacros/mergeMakeOCDB.jdl | sed "s_/j/jotwinow/_${AlienName}_g" > mergeMakeOCDB.jdl
51echo alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
52alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
53
54#
55# 3. Copy validation switch off return value - job will alway finish
56#
57cat $InputMacros/validationMerging.sh | sed "s_exit \$error_exit 0_" > validationMerging.sh
58echo alien_cp -n validationMerging.sh alien:///$OutputMacros/validationMerging.sh
59alien_cp -n validationMerging.sh alien:///$OutputMacros/validationMerging.sh
60#
61# 4. Submit job
62#
63echo alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath
64alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath &
65echo Alien job submitted $!
66