Skip to content

Commit

Permalink
Script to run PPass
Browse files Browse the repository at this point in the history
  • Loading branch information
chiarazampolli committed Feb 13, 2017
1 parent 40348a1 commit 563b4b8
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions DataProc/PPass/aliroot_dpgPPass.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

export PRODUCTION_METADATA="$ALIEN_JDL_LPMMETADATA"
export pass_type=ppass

###

#if [ "$1" = "OCDB" ]; then
# echo "Setting env for generating OCDB.root"
#
# export OCDB_SNAPSHOT_CREATE="kTRUE"
# export OCDB_SNAPSHOT_FILENAME="OCDB.root"
#
# touch OCDB.generating.job
#
# shift
#fi

# unset ALIDPG_ROOT in case you find the tgz, so that it can be set again later
if [ -f "alidpg.tgz" ]; then
export ALIDPG_ROOT=
fi

### check environment

if [ "$ALIDPG_ROOT" = "" ]; then

if [ -f "alidpg.tgz" ]; then

echo "Using AliDPG from tarball"
tar zxvf alidpg.tgz
export ALIDPG_ROOT=AliDPG

else

echo "*! ERROR: ALIDPG_ROOT is not set!"
echo "ERROR: ALIDPG_ROOT is not set!" > validation_error.message
exit

fi
fi

### dgpsim.sh

DPGSIMSH=$ALIDPG_ROOT/DataProc/PPass/runPPass.sh
if [ -f runPPass.sh ]; then
chmod +x runPPass.sh
DPGSIMSH=./runPPass.sh
fi
echo "Calling '$DPGSIMSH $*'"
$DPGSIMSH $*
error=$?

if [ $error -ne 0 ]; then
echo "*! Command '$DPGSIMSH $*' exited with error code $error"
# echo "Command '$DPGSIMSH $*' exited with error code $error" > validation_error.message
exit $error
fi

exit 0

0 comments on commit 563b4b8

Please sign in to comment.