Printf("\n******* Calibrating TPC *******");
procesTPC = new AliTPCPreprocessorOffline;
// switch on parameter validation
- procesTPC->SetTimeGainRange(0.5,3.0);
+ procesTPC->SetTimeGainRange(0.5,4.0);
procesTPC->SwitchOnValidation();
// Make timegain calibration
merger.SetNoTrees(kFALSE);
// merger.SetMaxFilesOpen(999);
merger.AddReject("esdFriend"); // do not merge
+ merger.AddReject("syswatchRec"); // do not merge
+ merger.AddReject("syswatchCalib"); // do not merge
//
if (maxFiles<2) maxFiles = 2;
TString filesToMerge = mlist, fileDest = dest;
# Files assumed to be in working directory:
# recCPass0.C - reconstruction macro
# runCalibTrain.C - calibration/filtering macro
-# Arguments (for running on the grid, as called from JDL in central productions):
-# 1 - raw data file
-# 2 - "OCDB" for creating the OCDB snapshot
-
-# Arguments (local mode - triggered when $# >= 4):
+# Arguments (run locally):
# 1 - raw data file name
# 2 - number of events to be processed
# 3 - run number
-# 4 - OCDBPath
-# 5 - optional trigger mask
+
# example:
-# runCPass0.sh raw.root 50 104892 raw://
+# runCPass0.sh raw.root 50 104892
#ALIEN setting
# $1 = raw input filename
runNum=`echo $1 | cut -d "/" -f 6 | sed 's/^0*//'`
-if [ $# -lt 3 ] ; then
- # alien Setup
- nEvents=99999999
- fileName="alien://"$1
- ocdbPath="raw://"
- triggerAlias="?Trigger=kCalibBarrel"
-fi;
-if [ $# -ge 4 ] ; then
+
+if [ $# -lt 3 ]; then
+ # alien Setup
+ nEvents=99999999
+ ocdbPath="raw://"
+ triggerAlias="?Trigger=kCalibBarrel"
+fi
+
+if [ $# -ge 4 ]; then
# local setup
- fileName=$1
nEvents=$2
runNum=$3
ocdbPath=$4
triggerAlias="?Trigger=kCalibBarrel"
fi
-if [ $# -eq 5 ] ; then
- # local setup in case we provide the trigger mask
- # the trigger mask is first stripped of quotation characters
- triggerAlias=${5//\"/}
-fi
-echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
-echo runCPass0.sh Input arguments
-echo fileName=$fileName
-echo nEvents=$nEvents
-echo runNum=$runNum
-echo ocdbPath=$ocdbPath
-echo triggerAlias=$triggerAlias
-echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
+if [ $# -eq 5 ]; then
+ # local setup in case we provide the trigger mask
+ # the trigger mask is first stripped of quotation characters
+ triggerAlias=${5//\"/}
+fi
if [ -f Run0_999999999_v3_s0.root ]; then
mkdir -p TPC/Calib/Correction
mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
fi
+echo "File to be processed $1"
+echo "Number of events to be processed $nEvents"
-
-echo File to be processed $1
-echo Number of events to be processed $nEvents
-
-echo ">>>>>>>>> PATH is..."
-echo $PATH
-echo ">>>>>>>>> LD_LIBRARY_PATH is..."
-echo $LD_LIBRARY_PATH
-echo ">>>>>>>>> recCPass0.C is..."
-#cat recCPass0.C
+echo "* PATH: $PATH"
+echo "* LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
echo
-echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..."
-
if [ "$2" == "OCDB" ]; then
echo "Generating OCDB.root only"
export OCDB_SNAPSHOT_CREATE="kTRUE"
echo "* Running AliRoot to reconstruct $*"
echo "* Chunk name: $CHUNKNAME"
echo "* Run number: $runNum"
+echo "* nEvents: $nEvents"
+echo "* ocdbPath: $ocdbPath"
+echo "* triggerAlias: $triggerAlias"
echo ""
-echo aliroot -l -b -q "recCPass0.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerAlias\")"
+echo executing aliroot -l -b -q "recCPass0.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerAlias\")"
time aliroot -l -b -q "recCPass0.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerAlias\")" &> rec.log
exitcode=$?
-echo "*! Exit code of recCPass0.C(\"$CHUNKNAME\"): $exitcode"
+echo "*! Exit code of recCPass0.C: $exitcode"
+
+if [ $exitcode -ne 0 ]; then
+ exit $exitcode
+fi
mv syswatch.log syswatch_rec.log
-echo "directory contents:"
-ls
if [ "$2" == "OCDB" ]; then
echo "*! Reconstruction ran in fake mode to create OCDB.root, exiting quickly now"
fi
echo "* Running AliRoot to make calibration..."
-echo time aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")"
+echo executing aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")"
time aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")" &> calib.log
exitcode=$?
-echo "*! Exit code of runCalibTrain.C(\"$runNum\"): $exitcode"
-
-mv syswatch.log syswatch_calib.log
+echo "*! Exit code of runCalibTrain.C: $exitcode"
-if [[ -f $ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeSyswatchCPass0.C ]]; then
- echo ">>>>>>> Extracting system information..."
- echo executing aliroot -b -q "$ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeSyswatchCPass0.C(\"AliESDfriends_v1.root\")"
- aliroot -b -q "$ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeSyswatchCPass0.C(\"AliESDfriends_v1.root\")"
-else
- echo $ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeSyswatchCPass0.C not there
-fi
+exit $exitcode
Printf("\n******* Calibrating TPC *******");
procesTPC = new AliTPCPreprocessorOffline;
// switch on parameter validation
- procesTPC->SetTimeGainRange(0.5,3.0);
+ procesTPC->SetTimeGainRange(0.5,4.0);
procesTPC->SwitchOnValidation();
// Make timegain calibration
//proces.CalibTimeGain("CalibObjects.root", runNumber,AliCDBRunRange::Infinity(),targetOCDBstorage);
merger.SetNoTrees(kFALSE);
// merger.SetMaxFilesOpen(999);
merger.AddReject("esdFriend"); // do not merge
+ merger.AddReject("syswatchRec"); // do not merge
+ merger.AddReject("syswatchCalib"); // do not merge
//
if (maxFiles<2) maxFiles = 2;
TString filesToMerge = mlist, fileDest = dest;
# $3 = OCDB path
path=$1
-runNumber=$2
+runNumber=`echo "$2" | sed 's/^0*//'`
outputOCDB=$3
-# if fourth argument given, its the default OCDB, otherwise use the default raw://
+# if fourth argument given, it is the default OCDB, otherwise use the default raw://
defaultOCDB="raw://"
[[ -n $4 ]] && defaultOCDB=$4
mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
fi
-echo ">>>>>>> Running AliRoot to merge calib objects found in $path with pattern AliESDfriends_v1.root"
-aliroot -l -b -q "merge.C(\"$path\",\"AliESDfriends_v1.root\")" 2>&1 | tee merge.log
+echo "* Running AliRoot to merge calib objects found in $path with pattern AliESDfriends_v1.root"
+echo aliroot -l -b -q "merge.C(\"$path\",\"AliESDfriends_v1.root\")"
+time aliroot -l -b -q "merge.C(\"$path\",\"AliESDfriends_v1.root\")" &> merge.log
+
+exitcode=$?
+
+echo "*! Exit code: $exitcode"
+
mv syswatch.log syswatch_merge.log
-echo ">>>>>>> Extract OCDB entries for run = $runNumber, to be stored in $outputOCDB"
-aliroot -l -b -q "makeOCDB.C($runNumber,\"$outputOCDB\",\"$defaultOCDB\")" 2>&1 | tee ocdb.log
+echo "* Extract OCDB entries for run = $runNumber, to be stored in $outputOCDB"
+echo aliroot -l -b -q "makeOCDB.C($runNumber,\"$outputOCDB\",\"$defaultOCDB\")"
+time aliroot -l -b -q "makeOCDB.C($runNumber,\"$outputOCDB\",\"$defaultOCDB\")" &> ocdb.log
+
+exitcode=$?
+
+echo "*! Exit code: $exitcode"
+
mv syswatch.log syswatch_makeOCDB.log
# Script to run:
# 1. reconstruction
-# 2. calibration
+# 2. calibration
#
# Files assumed to be in working directory:
# recCPass1.C - reconstruction macro
# 1 - raw data file name
# 2 - number of events to be processed
# 3 - run number
-# 4 - OCDBPath
-# 5 - optional trigger mask
+
# example:
-# runCPass1.sh raw.root 50 104892 raw://
+# runCPass1.sh raw.root 50 104892
#ALIEN setting
# $1 = raw input filename
runNum=`echo $1 | cut -d "/" -f 6 | sed 's/^0*//'`
-if [ $# -eq 1 ] ; then
- # alien Setup
- nEvents=99999999
- fileName="alien://"$1
- ocdbPath="raw://"
- triggerOptions="?Trigger=kCalibBarrel"
-fi;
-if [ $# -ge 4 ] ; then
- # local setup
- fileName=$1
- nEvents=$2
- runNum=$3
- ocdbPath=$4
- triggerOptions="?Trigger=kCalibBarrel"
+
+if [ $# -eq 1 ]; then
+ # alien Setup
+ nEvents=99999999
+ ocdbPath="raw://"
+ triggerOptions="?Trigger=kCalibBarrel"
+fi
+
+if [ $# -ge 4 ]; then
+ # local setup
+ nEvents=$2
+ runNum=$3
+ ocdbPath=$4
+ triggerOptions="?Trigger=kCalibBarrel"
fi
-if [ $# -eq 5 ] ; then
- # local setup in case we specify the trigger mask
- triggerOptions=$5
+
+if [ $# -eq 5 ]; then
+ # local setup in case we specify the trigger mask
+ triggerOptions=$5
fi
CHUNKNAME="$1"
CHUNKNAME="collection://wn.xml"
fi
-echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
-echo runCPass1.sh Input arguments
-echo fileName=$fileName
-echo nEvents=$nEvents
-echo runNum=$runNum
-echo ocdbPath=$ocdbPath
-echo triggerOptions=$triggerOptions
-echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
echo "* ************************"
echo "* runCPass1.sh $*"
echo "* Chunk name: $CHUNKNAME"
echo "* Run number: $runNum"
+echo "* nEvents: $nEvents"
+echo "* runNum: $runNum"
+echo "* ocdbPath: $ocdbPath"
+echo "* triggerOptions: $triggerOptions"
echo "* ************************"
+mkdir Barrel OuterDet
+
if [ -f Run0_999999999_v3_s0.root ]; then
echo "* TPC correction file found"
mkdir -p TPC/Calib/Correction
mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
- mkdir -p Barrel/TPC/Calib/Correction
- ln -s ../../../../TPC/Calib/Correction/Run0_999999999_v3_s0.root Barrel/TPC/Calib/Correction/Run0_999999999_v3_s0.root
-
- mkdir -p OuterDet/TPC/Calib/Correction
- ln -s ../../../../TPC/Calib/Correction/Run0_999999999_v3_s0.root OuterDet/TPC/Calib/Correction/Run0_999999999_v3_s0.root
+ for DIR in Barrel OuterDet; do
+ mkdir -p $DIR/TPC/Calib/Correction
+ ln -s ../../../../TPC/Calib/Correction/Run0_999999999_v3_s0.root $DIR/TPC/Calib/Correction/Run0_999999999_v3_s0.root
+ done
fi
echo "* PATH: $PATH"
exit $exitcode
fi
-mkdir Barrel OuterDet
-
-[[ -f localOCDBaccessConfig.C ]] && cp localOCDBaccessConfig.C Barrel
-[[ -f localOCDBaccessConfig.C ]] && cp localOCDBaccessConfig.C OuterDet
-
-cp recCPass1.C Barrel/
-cp runCalibTrain.C Barrel/
-cp QAtrain_duo.C Barrel/
-
-cp recCPass1_OuterDet.C OuterDet/
-cp QAtrain_duo.C OuterDet/
+for COMMON_FILE in wn.xml localOCDBaccessConfig.C AddTaskTPCCalib.C OCDB.root QAtrain_duo.C; do
+ if [ -f $COMMON_FILE ]; then
+ ln -s ../$COMMON_FILE Barrel/$COMMON_FILE
+ ln -s ../$COMMON_FILE OuterDet/$COMMON_FILE
+ fi
+done
-if [ -f wn.xml ]; then
- cp wn.xml Barrel/
- cp wn.xml OuterDet/
-fi
+for BARREL_FILE in recCPass1.C runCalibTrain.C; do
+ ln -s ../$BARREL_FILE Barrel/$BARREL_FILE
+done
-if [ -f OCDB.root ]; then
- ln -s ../OCDB.root Barrel/OCDB.root
- ln -s ../OCDB.root OuterDet/OCDB.root
-fi
+for OUTER_FILE in recCPass1_OuterDet.C; do
+ ln -s ../$OUTER_FILE OuterDet/$OUTER_FILE
+done
#################################### Barrel #######################################
echo "* Running AliRoot to reconstruct barrel of $CHUNKNAME"
-echo "Barrel/recCPass1.C" >&2
-echo executing time aliroot -l -b -q "recCPass1.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerOptions\")"
-time aliroot -l -b -q "recCPass1.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerOptions\")" &> ../rec_Barrel.log
+echo executing aliroot -l -b -q "recCPass1.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerOptions\")"
+time aliroot -l -b -q "recCPass1.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\", \"$triggerOptions\")" &> ../rec.log
exitcode=$?
echo "Exit code: $exitcode"
echo "* Running AliRoot to make calibration..."
-echo "Barrel/recCalibTrain.C" >&2
-echo executing time aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")"
+echo executing aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")"
time aliroot -l -b -q "runCalibTrain.C($runNum,\"AliESDs.root\",\"$ocdbPath\")" &> ../calib.log
exitcode=$?
echo "Exit code: $exitcode"
if [ -f QAtrain_duo.C ]; then
echo "* Running the QA train (barrel) ..."
- echo "Barrel/QAtrain_duo.C" >&2
- echo executing time aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum,\"$ocdbPath\")"
- time aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum,\"$ocdbPath\")" &> ../qa_barrel.log
+# echo executing aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum,\"$ocdbPath\")"
+# time aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum,\"$ocdbPath\")" &> ../qa_barrel.log
+
+ echo executing aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum)"
+ time aliroot -b -q "QAtrain_duo.C(\"_barrel\",$runNum)" &> ../qa_barrel.log
+
exitcode=$?
echo "Exit code: $exitcode"
echo "* Running AliRoot to reconstruct outer of $CHUNKNAME"
-echo "OuterDet/recCPass1_OuterDet" >&2
echo executing aliroot -l -b -q "recCPass1_OuterDet.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\")"
time aliroot -l -b -q "recCPass1_OuterDet.C(\"$CHUNKNAME\", $nEvents, \"$ocdbPath\")" &> ../rec_Outer.log
exitcode=$?
if [ -f QAtrain_duo.C ]; then
echo "* Running the QA train (outer) ..."
- echo "OuterDet/QAtrain_duo.C" >&2
- echo executing time aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum,\"$ocdbPath\")"
- time aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum,\"$ocdbPath\")" &> ../qa_outer.log
+# echo executing aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum,\"$ocdbPath\")"
+# time aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum,\"$ocdbPath\")" &> ../qa_outer.log
+
+ echo executing aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum)"
+ time aliroot -b -q "QAtrain_duo.C(\"_outer\",$runNum)" &> ../qa_outer.log
+
exitcode=$?
echo "Exit code: $exitcode"
fi
done
-if [[ -f $ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeSyswatchCPass1.C ]]; then
- echo ">>>>>>> Extracting system information..."
- echo executing aliroot -b -q "$ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeSyswatchCPass1.C(\"AliESDfriends_v1.root\")"
- aliroot -b -q "$ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeSyswatchCPass1.C(\"AliESDfriends_v1.root\")"
-else
- echo $ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeSyswatchCPass1.C not there
-fi
+exit $exitcode