Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-08 02:27:13

0001 #!/bin/tcsh
0002 echo "Starting job on " `date` #Date/time of start of job
0003 echo "Running on: `uname -a`" #Condor job is running on this node
0004 echo "System software: `cat /etc/redhat-release`" #Operating System on that node
0005 source /cvmfs/cms.cern.ch/cmsset_default.csh  ## if a bash script, use .sh instead of .csh
0006 
0007 echo "myStart run_condor.csh"
0008 
0009 echo "myStart: set dir pwd"
0010 set m=`pwd`
0011 
0012 cd ${m}
0013 setenv SCRAM_ARCH slc7_amd64_gcc10
0014 cmsrel CMSSW_12_3_0_pre4
0015 cd CMSSW_12_3_0_pre4/src 
0016 
0017 mkdir DPGAnalysis
0018 cd DPGAnalysis
0019 
0020 mkdir HcalTools
0021 cd HcalTools
0022 
0023 mv ../../../../BuildFile.xml .
0024 ls
0025 
0026 mkdir interface
0027 mv ../../../../CMTRawAnalyzer.h interface/.
0028 mkdir src
0029 mv ../../../../CMTRawAnalyzer.cc src/.
0030 
0031 cd src
0032 ls
0033 eval `scramv1 runtime -csh` # cmsenv is an alias not on the workers
0034 echo "myStart: scram b"
0035 scram b 
0036 echo "myStart: scram b DONE"
0037 
0038 cd -
0039 mkdir test
0040 cd test
0041 cp ../../../../../* .
0042 ls
0043 
0044 setenv X509_USER_PROXY ${4}
0045 voms-proxy-info -all
0046 voms-proxy-info -all -file ${4}
0047 
0048 ./mkcfg_new120.csh ${1}
0049 ls PYTHON_${1}/*py
0050 
0051 ################################################################ loop:  
0052 echo "myStart: loop in run_condor.csh"
0053 if( ${status} == "0" ) then
0054 foreach i (`ls PYTHON_${1}`)
0055 
0056 set j=`echo ${i} | awk -F _ '{print $2}'`
0057 set k=`echo ${i} | awk -F _ '{print $3}'`
0058 
0059 echo ${m} ${1} ${i} ${j} ${k} 
0060 
0061 eval `scramv1 runtime -csh` # cmsenv is an alias not on the workers 
0062 cmsRun PYTHON_${1}/Reco_${j}_${k}_cfg.py 
0063 
0064 ### Copy output files to EOS
0065 ### xrdcp -f Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/test/Global_${j}_${k}.root
0066 eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/RootFilesToBeMarched/2022/Global_${j}_${k}.root
0067 #eoscp Global_${j}_${k}.root /eos/cms/store/user/zhokin/CMT/test/Global_${j}_${k}.root
0068 
0069 ################################################################
0070 end
0071 else
0072 echo "Problem: No jobs are created: check PYTHON_${1} directory: Notify developpers"
0073 endif
0074