17 if [
"$LSB_JOBID" !=
"" ]
22 source $macroDir/CrombieSlimmingConfig.sh
24 ERRORLOG=$macroDir/LxbatchFileChecks.log
27 if [
"$CMSSW_BASE" !=
"" ]
31 eval `scram runtime -sh`
38 for file
in `cat $macroDir/$CrombieJobScriptList`
41 if [
"$file" !=
"${file/\//}" ]
44 making=${file%%/${file
54 cp $macroDir/$file $file
64 tar -xzvf condor_package.tar.gz
66 export X509_USER_PROXY=`pwd`/voms_proxy.cert
67 source CrombieSubmitConfig.sh
69 export SCRAM_ARCH=$CrombieScram
70 export VO_CMS_SW_DIR=/cvmfs/cms.cern.ch
71 source $VO_CMS_SW_DIR/cmsset_default.sh
73 scramv1 project CMSSW $CrombieRelease
76 if [ -f ../cmssw_patch.tgz ]
79 mv ../cmssw_patch.tgz .
80 tar -xzvf cmssw_patch.tgz
84 eval `scramv1 runtime -sh`
91 mv crombie.tgz CrombieTools/.
94 export CROMBIEPATH=`pwd`
95 export PATH=`pwd`/bin:$PATH
96 export PYTHONPATH=`pwd`/python:$PYTHONPATH
103 set -- `tar -ztf input_files.tar.gz | sort`
104 tar -xzvf input_files.tar.gz ${!outFile}
106 outFile=${outFile%%.txt}
108 for file
in `ls *.tgz`
115 export PATH=`pwd`:$PATH
119 echo
"Trying to make $outFile.root" 124 $CrombieSlimmerScript
128 echo
"Compilation failed. Submit again..." 132 OutputBase=
"lxbatchTmpOutput" 133 CommandList=
"ArgsForThisJob.txt" 136 for file
in `cat $outFile.txt`
141 echoCommand=
"echo ${file##*/} $OutputBase\_$NUM.root" 144 $echoCommand >> $CommandList
151 cat $CommandList | xargs -n2 -P$LSB_MAX_NUM_PROCESSORS $CrombieSlimmerScript
155 hadd $OutputBase.root $OutputBase\_*.root
161 for file
in `ls $OutputBase*.root`
164 "$CrombieCheckerScript" $file
172 echo
"Could not find acceptable output in $file" >> $ERRORLOG
173 echo
"Check output in job bout/out.$LSB_JOBID" >> $ERRORLOG
177 elif [
"$file" =
"$OutputBase.root" ]
192 if [ $FINALEMPTY -eq 1 ]
195 if [ $ALLEMPTY -eq 0 ]
198 echo
"Final output is empty, but not all are." >> $ERRORLOG
199 echo
"Check output in job bout/out.$LSB_JOBID" >> $ERRORLOG
205 echo
"Everything is empty in this job, copying anyway." >> $ERRORLOG
206 echo
"Check output in job bout/out.$LSB_JOBID" >> $ERRORLOG
212 if [ $FATALERROR -eq 1 ]
215 echo
"FATAL ERROR in bout/out.$LSB_JOBID" >> $ERRORLOG
231 if [
"$LSB_JOBID" =
"" ]
234 destination=$CrombieTempDir/${outFile%%_[0-9]*}/$outFile.root
235 echo
"Copying to $destination!" 236 lcg-cp -v -D srmv2 -b file://$PWD/$OutputBase.root \
237 srm://t3serv006.mit.edu:8443/srm/v2/server\?SFN=$destination
241 echo
"Copying to $outFile.root" 242 cp $OutputBase.root $outFile.root
249 echo
"Copying failed! Check your quota." >> $ERRORLOG
250 echo
"Check output in job bout/out*$LSB_JOBID.log" >> $ERRORLOG