fi
[[ -z ${commonOutputPath} ]] && commonOutputPath=${PWD}
- doneFile="${commonOutputPath}/meta/cpass0.job${jobindex}.run${runNumber}.done"
- [[ -n ${useProfilingCommand} ]] && doneFile="${commonOutputPath}/meta/profiling.cpass0.job${jobindex}.run${runNumber}.done"
+ doneFile="cpass0.job${jobindex}.run${runNumber}.done"
+ [[ -n ${useProfilingCommand} ]] && doneFile="profiling.cpass0.job${jobindex}.run${runNumber}.done"
+ [[ -z ${doneFileDest} ]] && doneFileDest="${commonOutputPath}/meta/"
[[ -f ${alirootSource} && -z ${ALICE_ROOT} ]] && source ${alirootSource}
if [[ ! -d ${outputDir} ]]; then
touch ${doneFile}
echo "cannot make ${outputDir}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if [[ ! -d ${runpath} ]]; then
touch ${doneFile}
echo "cannot make runpath ${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if ! cd ${runpath}; then
touch ${doneFile}
echo "PWD=$PWD is not the runpath=${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if [[ ! -f ${inputList} && -z ${pretend} ]]; then
touch ${doneFile}
echo "input file ${inputList} not found, exiting..." >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
echo targetDirectory ${targetDirectory}
echo commonOutputPath ${commonOutputPath}
echo doneFile ${doneFile}
+ echo doneFileDest ${doneFileDest}
echo batchWorkingDirectory=$batchWorkingDirectory
echo runpath ${runpath}
echo outputDir ${outputDir}
[[ -f AliESDfriends_v1.root ]] && echo "calibfile ${outputDir}/AliESDfriends_v1.root" >> ${doneFile}
[[ -f AliESDs.root ]] && echo "esd ${outputDir}/AliESDs.root" >> ${doneFile}
fi
+ cp ${doneFile} ${doneFileDest}
[[ "${runpath}" != "${outputDir}" ]] && rm -rf ${runpath} && echo "removing ${runpath}"
return 0
fi
[[ -z ${commonOutputPath} ]] && commonOutputPath=${PWD}
- doneFile="${commonOutputPath}/meta/cpass1.job${jobindex}.run${runNumber}.done"
- [[ -n ${useProfilingCommand} ]] && doneFile="${commonOutputPath}/meta/profiling.cpass1.job${jobindex}.run${runNumber}.done"
+ doneFile="cpass1.job${jobindex}.run${runNumber}.done"
+ [[ -n ${useProfilingCommand} ]] && doneFile="profiling.cpass1.job${jobindex}.run${runNumber}.done"
+ [[ -z ${doneFileDest} ]] && doneFileDest="${commonOutputPath}/meta/"
[[ -f ${alirootSource} && -z ${ALICE_ROOT} ]] && source ${alirootSource}
if [[ ! -f ${inputList} && -z ${pretend} ]]; then
touch ${doneFile}
echo "input file ${inputList} not found, exiting..." >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if [[ "${inputList}" =~ \.root$ ]]; then
if [[ ! -d ${outputDir} ]];then
touch ${doneFile}
echo "cannot make ${outputDir}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if [[ ! -d ${runpath} ]]; then
touch ${doneFile}
echo "cannot make runpath ${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if ! cd ${runpath}; then
touch ${doneFile}
echo "PWD=$PWD is not the runpath=${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
echo targetDirectory ${targetDirectory}
echo commonOutputPath ${commonOutputPath}
echo doneFile ${doneFile}
+ echo doneFileDest ${doneFileDest}
echo runpath ${runpath}
echo outputDir ${outputDir}
echo batchWorkingDirectory ${batchWorkingDirectory}
if [[ ! $(/bin/ls -1 OCDB/*/*/*/*.root 2>/dev/null) ]]; then
touch ${doneFile}
echo "cpass0 produced no calibration! exiting..." >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
[[ -f FilterEvents_Trees.root ]] && echo "filteredTree ${outputDir}/FilterEvents_Trees.root" >> ${doneFile}
fi
fi
+ cp ${doneFile} ${doneFileDest}
[[ "${runpath}" != "${outputDir}" ]] && rm -rf ${runpath}
return 0
batchWorkingDirectory=${PWD}
[[ -z ${commonOutputPath} ]] && commonOutputPath=${PWD}
- doneFile="${commonOutputPath}/meta/merge.cpass0.run${runNumber}.done"
+ doneFile="merge.cpass0.run${runNumber}.done"
+ [[ -z ${doneFileDest} ]] && doneFileDest="${commonOutputPath}/meta/"
umask 0002
ulimit -c unlimited
if [[ ! -d ${runpath} ]]; then
touch ${doneFile}
echo "not able to make the runpath ${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if ! cd ${runpath}; then
touch ${doneFile}
echo "PWD=$PWD is not the runpath=${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
[[ -f CalibObjects.root ]] && echo "calibfile ${outputDir}/CalibObjects.root" >> ${doneFile}
[[ -f dcsTime.root ]] && echo "dcsTree ${outputDir}/dcsTime.root" >> ${doneFile}
fi
+ cp ${doneFile} ${doneFileDest}
[[ "${runpath}" != "${outputDir}" ]] && rm -rf ${runpath}
return 0
batchWorkingDirectory=${PWD}
[[ -z ${commonOutputPath} ]] && commonOutputPath=${PWD}
- doneFile="${commonOutputPath}/meta/merge.cpass1.run${runNumber}.done"
+ doneFile="merge.cpass1.run${runNumber}.done"
+ doneFile="${commonOutputPath}/meta/"
umask 0002
ulimit -c unlimited
if [[ ! -d ${runpath} ]]; then
touch ${doneFile}
echo "not able to make the runpath ${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
if ! cd ${runpath}; then
touch ${doneFile}
echo "PWD=$PWD is not the runpath=${runpath}" >> ${doneFile}
+ cp ${doneFile} ${doneFileDest}
return 1
fi
fi
fi
+ cp ${doneFile} ${doneFileDest}
+
[[ "${runpath}" != "${outputDir}" ]] && rm -rf ${runpath}
return 0
)
batchWorkingDirectory=${PWD}
[[ -z ${commonOutputPath} ]] && commonOutputPath=${PWD}
- doneFile=${commonOutputPath}/meta/filtering.cpass1.run${runNumber}.done
+ doneFile=filtering.cpass1.run${runNumber}.done
+ [[ -z ${doneFileDest} ]] && doneFileDest="${commonOutputPath}/meta/"
cat > filtering.log << EOF
goMakeFilteredTrees config:
#if ! cd ${runpath}; then
# echo "PWD=$PWD is not the runpath=${runpath}"
# touch ${doneFile}
+ # cp ${doneFile} ${doneFileDest}
# return 1
#fi
#[[ -f ${outputDir}/FilterEvents_Trees.root ]] && echo "filteredTree ${outputDir}/FilterEvents_Trees.root" >> ${doneFile}
#cd ${commonOutputPath}
#[[ "${runpath}" != "${outputDir}" ]] && rm -rf ${runpath}
-
+
+ cp ${doneFile} ${doneFileDest}
+
return 0
)