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:
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/CPass0/169926
13 # AlienName=/m/miranov/
14 # $ALICE_ROOT/PWGPP/CalibMacros/CPass0/test/mergeMakeOCDBUser.sh $AlienName /alice/data/2011/LHC11h/000$Run/cpass0_HLT/ $Run alien://folder=/alice/cern.ch/user/m/miranov/CPass0/$Run
16 # authors: marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch
22 InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass0/
24 echo xxxxxxxxxxxxxxxxxxxxxxxxxx
30 echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass0/
31 echo xxxxxxxxxxxxxxxxxxxxxxxxxx
34 # 1. copy macroses and sh to the predefiend alien directory
36 OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
37 alien_mkdir -p $OutputMacros
39 for 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
45 # 2. Copy shell script and jdl
47 OutputBin=`echo /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
48 echo alien_cp -n $InputMacros/mergeMakeOCDB.sh alien://$OutputBin/mergeMakeOCDB.sh
49 alien_cp -n $InputMacros/mergeMakeOCDB.sh alien://$OutputBin/mergeMakeOCDB.sh
50 cat $InputMacros/mergeMakeOCDB.jdl | sed "s_/j/jotwinow/_${AlienName}_g" > mergeMakeOCDB.jdl
51 echo alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
52 alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
55 # 3. Copy validation switch off return value - job will alway finish
57 cat $InputMacros/validationMerging.sh | sed "s_exit \$error_exit 0_" > validationMerging.sh
58 echo alien_cp -n validationMerging.sh alien:///$OutputMacros/validationMerging.sh
59 alien_cp -n validationMerging.sh alien:///$OutputMacros/validationMerging.sh
63 echo alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath
64 alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath &
65 echo Alien job submitted $!