]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updating steering macros according to latest changes in alien:
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jul 2012 12:55:39 +0000 (12:55 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jul 2012 12:55:39 +0000 (12:55 +0000)
- modified TPC gain threshold
- disabling merging of syswatch trees
- updating of the scripts according to Costin's modifications

PWGPP/CalibMacros/CPass0/makeOCDB.C
PWGPP/CalibMacros/CPass0/merge.C
PWGPP/CalibMacros/CPass0/runCPass0.sh
PWGPP/CalibMacros/CPass1/makeOCDB.C
PWGPP/CalibMacros/CPass1/merge.C
PWGPP/CalibMacros/CPass1/mergeMakeOCDB.sh
PWGPP/CalibMacros/CPass1/runCPass1.sh

index 25f34c3c5f55b7ec122debaa5bc4f5f891eb57c7..178fdc3d31b1a9ef46919dda9327cd560cb76996 100644 (file)
@@ -60,7 +60,7 @@ void makeOCDB(Int_t runNumber, TString  targetOCDBstorage="", TString sourceOCDB
     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
index eba0cd4c0ebd703408675ee16eae9a39d44935e9..fcefb57ae0a8fb88aba7d4510ea7d6db109022fb 100644 (file)
@@ -117,6 +117,8 @@ void mergeInChunksTXT(const char* mlist, const char* dest, int maxFiles)
   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;
index dd1c4d03df4f3412a0f49e29d4d1af2a36f76ca3..d8da94eb3020f749912f1e95bf27acd0e340f0e0 100644 (file)
@@ -7,72 +7,51 @@
 # 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"
@@ -100,18 +79,23 @@ fi
 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"
@@ -127,18 +111,10 @@ if [ "$2" == "OCDB" ]; then
 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
index b15015703880461dfbcdc687c80eac67b3e0e36a..dce668002ef3a47db559c880eb75bcfc09f0c1fb 100644 (file)
@@ -58,7 +58,7 @@ void makeOCDB(Int_t runNumber, TString  targetOCDBstorage="", TString sourceOCDB
     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);
index eb8b266429917e8edeeefffe1079d7a8c0042959..e31bbb74232dc41e52078ecbf4c855670ca4b1d5 100644 (file)
@@ -117,6 +117,8 @@ void mergeInChunksTXT(const char* mlist, const char* dest, int maxFiles)
   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;
index db77c407fb700bc665a69df05023363f02e0d402..c21a714ea7e744848316bf8e61901e02d7ba990b 100755 (executable)
 # $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
 
@@ -28,10 +28,22 @@ if [ -f Run0_999999999_v3_s0.root ]; then
     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
index 5c5bf581b85da224ddadef141aa3a1a0cabc19b8..cddcceda5bc5d2d399c3394540524a3f91e608db 100755 (executable)
@@ -2,7 +2,7 @@
 
 # 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"
@@ -58,31 +58,28 @@ if [ -f "wn.xml" ]; then
     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"
@@ -113,27 +110,20 @@ if [ "$2" == "OCDB" ]; then
     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   #######################################
 
@@ -141,9 +131,8 @@ cd 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"
 
@@ -155,8 +144,7 @@ mv syswatch.log ../syswatch_rec_Barrel.log
 
 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"
@@ -170,9 +158,12 @@ mv syswatch.log ../syswatch_calib.log
 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"
 
@@ -200,7 +191,6 @@ cd ../OuterDet
 
 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=$?
@@ -215,9 +205,12 @@ mv syswatch.log ../syswatch_rec_Outer.log
 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"
 
@@ -239,10 +232,4 @@ for file in QAresults_outer.root EventStat_temp_outer.root; do
     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