1. Replacing CPass0 with CPass1 in the text of macros
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 13:27:22 +0000 (13:27 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 13:27:22 +0000 (13:27 +0000)
2. Adding test macro

PWGPP/CalibMacros/CPass1/AddTaskTPCCalib.C
PWGPP/CalibMacros/CPass1/CPass1.jdl
PWGPP/CalibMacros/CPass1/LoadLibraries.C
PWGPP/CalibMacros/CPass1/makeOCDB.C
PWGPP/CalibMacros/CPass1/makeOCDB.byComponent.C
PWGPP/CalibMacros/CPass1/mergeMakeOCDB.jdl
PWGPP/CalibMacros/CPass1/mergeMakeOCDB.sh
PWGPP/CalibMacros/CPass1/runCPass1.sh
PWGPP/CalibMacros/CPass1/test/mergeMakeOCDBUser.sh [new file with mode: 0755]
PWGPP/CalibMacros/CPass1/test/runCPass1User.sh [new file with mode: 0755]

index 463d859..de6a6a5 100644 (file)
@@ -1,7 +1,7 @@
 /*
 
  This macros setup the TPC calibration task AddTaskTPCCalib
- for CPass0.
+ for CPass1.
  - the run number is required to config TPC OCDB
  
  The following calibration components are added to the AliTPCAnalysisTaskcalib task:
index 833d633..d3e2b57 100644 (file)
@@ -1,17 +1,17 @@
-Executable="/alice/cern.ch/user/j/jotwinow/bin/runCPass0.sh";
+Executable="/alice/cern.ch/user/j/jotwinow/bin/runCPass1.sh";
 
 Packages= { "VO_ALICE@AliRoot::v5-02-Rev-04",
            "VO_ALICE@ROOT::v5-30-06-1",        
             "VO_ALICE@APISCONFIG::V1.1x"
 };
 
-Jobtag = { "Test CPass0 Calibration Train" };
+Jobtag = { "Test CPass1 Calibration Train" };
 
 GUIDFILE="guid.txt";
 TTL = "28000";
 Price = 1;
 
-Validationcommand ="/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/validation.sh";
+Validationcommand ="/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/validation.sh";
 
 Split="file";
 
@@ -22,19 +22,19 @@ GUIDFILE="guid.txt";
 SplitArguments = {"/alice/data/2010/LHC10d/$1/raw/#alienfilename#"};
 Workdirectorysize={"6000MB"};
 
-InputFile={"LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/recCPass0.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/ConfigCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/runCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/AddTaskTPCCalib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/AddTaskTRDCalib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/AddTaskT0Calib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/AddTOFAnalysisTaskCalibPass0.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/CalibMacros/LoadLibraries.C"
+InputFile={"LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/recCPass1.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/ConfigCalibTrain.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/runCalibTrain.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/AddTaskTPCCalib.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/AddTaskTRDCalib.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/AddTaskT0Calib.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/AddTOFAnalysisTaskCalibPass0.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/LoadLibraries.C"
 };
 
 InputDataCollection="LF:/alice/data/2010/LHC10d/$1/collection,nodownload";
 
-OutputDir="/alice/cern.ch/user/j/jotwinow/CPass0/output/$1/#alienfilename/.root//#";
+OutputDir="/alice/cern.ch/user/j/jotwinow/CPass1/output/$1/#alienfilename/.root//#";
 
 OutputArchive={"log_archive:*.log@disk=1",
               "root_archive.zip:AliESDfriends_v1.root,@disk=1"};
index e662314..538a397 100644 (file)
@@ -1,6 +1,6 @@
 void LoadLibraries() {
     //
-    // load libraries needed for CPass0
+    // load libraries needed for CPass1
     //
     gSystem->Load("libSTAT");
     gSystem->Load("libANALYSIS");
index 2df6b9b..b254038 100644 (file)
@@ -5,7 +5,7 @@
   ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD
 
   Example:
-  .L $ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeOCDB.C
+  .L $ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeOCDB.C
   makeOCDB("105160");
 
 */
index 8cf1374..8e599b0 100644 (file)
@@ -5,7 +5,7 @@
   ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD
 
   Example:
-  .L $ALICE_ROOT/PWGPP/CalibMacros/CPass0/makeOCDB.C
+  .L $ALICE_ROOT/PWGPP/CalibMacros/CPass1/makeOCDB.C
   makeOCDB("105160");
 
 */
index cbff816..19fa193 100644 (file)
@@ -10,7 +10,7 @@ GUIDFILE="guid.txt";
 TTL = "28000";
 Price = 1;
 
-Validationcommand ="/alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/validationMerging.sh";
+Validationcommand ="/alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/validationMerging.sh";
 
 JDLVariables={"Packages", "OutputDir"};
 GUIDFILE="guid.txt";
@@ -19,13 +19,13 @@ Arguments = "$1 $2 $3";
 
 Workdirectorysize={"6000MB"}; 
 
-InputFile={"LF:/alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/ConfigCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/LoadLibraries.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/makeOCDB.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/CPass0/MergeCalibration/merge.C"
+InputFile={"LF:/alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/ConfigCalibTrain.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/LoadLibraries.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/makeOCDB.C",
+           "LF:/alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/merge.C"
 };
 
-OutputDir="/alice/cern.ch/user/j/jotwinow/CPass0/output/$2/";
+OutputDir="/alice/cern.ch/user/j/jotwinow/CPass1/output/$2/";
 
 OutputArchive={"log_archive:*.log@disk=1",
               "root_archive.zip:CalibObjects.root,meanITSVertex.root,fitITSVertex.root@disk=1"};
index bd60a2f..4ca866c 100755 (executable)
@@ -7,7 +7,7 @@
 #    3 - OCDB output path
 
 # example:
-# mergeMakeOCDB.sh /alice/cern.ch/user/a/aliprod/CPass0/output/ 000120691 alien://folder=/alice/cern.ch/user/a/aliprod/CPass0/output
+# mergeMakeOCDB.sh /alice/cern.ch/user/a/aliprod/CPass1/output/ 000120691 alien://folder=/alice/cern.ch/user/a/aliprod/CPass1/output
 
 #ALIEN setting
 # $1 = directory where to perform the find 
index ec16b56..a9e4ab3 100644 (file)
@@ -5,7 +5,7 @@
 #    2. calibration and friend track filtering
 #
 # Files assumed to be in working directory:
-# recCPass0.C          - reconstruction macro
+# recCPass1.C          - reconstruction macro
 # runCalibTrain.C     - calibration/filtering macro
 # Arguments (run locally):
 #    1  - raw data file name
@@ -13,7 +13,7 @@
 #    3  - run number 
 
 # example:
-# runCPass0.sh raw.root  50  104892
+# runCPass1.sh raw.root  50  104892
 
 #ALIEN setting
 # $1 = raw input filename
@@ -33,7 +33,7 @@ if [ $# -eq 4 ] ; then
 fi
 
 echo xxxxxxxxxxxxxxxxxxxxxxxxxxx
-echo runCPass0.sh Input arguments
+echo runCPass1.sh Input arguments
 echo fileName=$fileName
 echo nEvents=$nEvents
 echo runNum=$runNum
@@ -54,13 +54,13 @@ echo ">>>>>>>>> PATH is..."
 echo $PATH
 echo ">>>>>>>>> LD_LIBRARY_PATH is..."
 echo $LD_LIBRARY_PATH
-echo ">>>>>>>>> recCPass0.C is..."
-#cat recCPass0.C
+echo ">>>>>>>>> recCPass1.C is..."
+#cat recCPass1.C
 echo
 
 echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runNum..."
 
-aliroot -l -b -q recCPass0.C\(\""$fileName\", $nEvents, \"$ocdbPath"\"\) 2>&1 | tee rec.log
+aliroot -l -b -q recCPass1.C\(\""$fileName\", $nEvents, \"$ocdbPath"\"\) 2>&1 | tee rec.log
 mv syswatch.log syswatch_rec.log
 
 echo ">>>>>>> Running AliRoot to make calibration..."
diff --git a/PWGPP/CalibMacros/CPass1/test/mergeMakeOCDBUser.sh b/PWGPP/CalibMacros/CPass1/test/mergeMakeOCDBUser.sh
new file mode 100755 (executable)
index 0000000..149e9f6
--- /dev/null
@@ -0,0 +1,66 @@
+# Script for testing of the mergemakeOCDB on the grid for user purposes
+# To be used in case the standard production failed or was not automatically validated
+# Output objects are writn to the predefined path:
+
+# 
+# Parameters for macro:
+# 1  -   alien user dir name                 - e.g  /m/miranov/
+# 2  -   input directory with data to merge  - e.g /alice/data/2011/LHC11h/000169926/cpass0_HLT/
+# 3  -   run number                          - e.g run number 169926
+# 4  -   OCDB output path                    - alien://folder=/alice/cern.ch/user/m/miranov/CPass1/169926
+# Example:
+# run=170572
+# AlienName=/m/miranov/
+# $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
+#
+# authors:   marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch 
+
+AlienName=$1
+InputDataDir=$2
+Run=$3
+OCDBPath=$4
+InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
+
+echo xxxxxxxxxxxxxxxxxxxxxxxxxx
+echo SETUP
+echo AlienName=$1
+echo InputDataDir=$2
+echo Run=$3
+echo OCDBPath=$4
+echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
+echo xxxxxxxxxxxxxxxxxxxxxxxxxx
+
+#
+# 1. copy macroses and sh to the predefiend alien directory
+#
+OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/CPass1/MergeCalibration/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
+alien_mkdir -p  $OutputMacros
+
+for lfile in `ls $InputMacros/{*C,*sh,*jdl} | grep -v AddTask`; do
+    bname=`basename $lfile`  
+    echo  Copping alien_cp -n $lfile alien://$OutputMacros/$bname 
+    alien_cp -n $lfile alien://$OutputMacros/$bname
+done
+#
+# 2. Copy shell script and jdl
+#
+OutputBin=`echo  /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
+echo alien_cp -n $InputMacros/mergeMakeOCDB.sh  alien://$OutputBin/mergeMakeOCDB.sh
+alien_cp -n  $InputMacros/mergeMakeOCDB.sh  alien://$OutputBin/mergeMakeOCDB.sh
+cat $InputMacros/mergeMakeOCDB.jdl | sed "s_/j/jotwinow/_${AlienName}_g" > mergeMakeOCDB.jdl
+echo alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
+alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
+
+#
+# 3. Copy validation switch off return value - job will alway finish
+#
+cat $InputMacros/validationMerging.sh |  sed "s_exit \$error_exit 0_" > validationMerging.sh
+echo alien_cp  -n validationMerging.sh  alien:///$OutputMacros/validationMerging.sh
+alien_cp  -n validationMerging.sh  alien:///$OutputMacros/validationMerging.sh
+#
+# 4. Submit job
+#
+echo alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath
+alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath &
+echo Alien job submitted $!
+
diff --git a/PWGPP/CalibMacros/CPass1/test/runCPass1User.sh b/PWGPP/CalibMacros/CPass1/test/runCPass1User.sh
new file mode 100755 (executable)
index 0000000..9e7215d
--- /dev/null
@@ -0,0 +1,65 @@
+# Script for testing of the CPass1.jdl  on the grid for user purposes
+# To be used for validation of modified user code before asking for porting
+
+# 
+# Parameters for macro:
+# 1  -   alien user dir name                 - e.g  /m/miranov/
+# 2  -   input directory with raw data       - e.g /alice/data/2011/LHC11a/
+# 3  -   run number                          - e.g run number 000146807
+# Example:
+# Run=000146807
+# AlienName=/m/miranov/
+# RawPath=/alice/data/2011/LHC11a/
+# $ALICE_ROOT/PWGPP/CalibMacros/CPass1/test/runCPass1User.sh  $AlienName $RawPath  $Run 
+#
+# authors:   marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch 
+
+AlienName=$1
+RawPath=$2
+Run=$3
+InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
+
+echo xxxxxxxxxxxxxxxxxxxxxxxxxx
+echo SETUP
+echo AlienName=$1
+echo RawPath=$2
+echo Run=$3 
+echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/CPass1/
+echo xxxxxxxxxxxxxxxxxxxxxxxxxx
+
+#
+# 1. copy macroses and sh to the predefiend alien directory
+#
+OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/CPass1/CalibMacros/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
+alien_mkdir -p $OutputMacros
+
+for lfile in `ls $InputMacros/{*C,*sh} `; do
+    bname=`basename $lfile`  
+    echo  Copping alien_cp -n $lfile alien://$OutputMacros/$bname 
+    alien_cp -n $lfile alien://$OutputMacros/$bname
+done
+
+
+#
+# 2. Copy shell script and jdl
+#
+OutputBin=`echo  /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
+echo alien_cp -n $InputMacros/runCPass1.sh  alien://$OutputBin/runCPass1.sh
+alien_cp -n  $InputMacros/runCPass1.sh   alien://$OutputBin/runCPass1.sh
+cat $InputMacros/CPass1.jdl | sed "s_/j/jotwinow/_${AlienName}_g" | sed "s_/alice/data/2010/LHC10d/_${RawPath}_g" > CPass1.jdl
+echo alien_cp -n CPass1.jdl alien://$OutputMacros/CPass1.jdl
+alien_cp -n CPass1.jdl alien://$OutputMacros/CPass1.jdl
+
+#
+# 3. Copy validation switch off return value - job will alway finish
+#
+cat $InputMacros/validation.sh |  sed "s_exit \$error_exit 0_" > validation.sh
+echo alien_cp  -n validation.sh  alien:///$OutputMacros/validation.sh
+alien_cp  -n validation.sh  alien:///$OutputMacros/validation.sh
+#
+# 4. Submit job
+#
+echo nohup alien_submit alien:///$OutputMacros/CPass1.jdl $Run  >submitJob$Run.txt
+#nohup alien_submit alien:///$OutputMacros/CPass1.jdl $Run  >submitJob$Run.txt
+#echo Alien job submitted $!
+