Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:00

0001 #!/bin/bash
0002 
0003 prim() {
0004 
0005 usage="Usage: ./prim [OPTION] <iz=0,1,2,3> <iSM=1,...18>"
0006 [ -z $1 ] && [ -z $2 ] && echo $usage && return
0007 
0008 dir="EB"
0009 [ $1 -eq 1 ] || [ $1 -eq 2 ] || dir="EE"
0010 
0011 iz=$1
0012 ism=$2
0013 
0014 topdir=${MESTORE}
0015 echo '> Top directory : ' $topdir
0016 if [ $iz -lt 2 ]
0017 then
0018     dir=${dir}-${ism}
0019 else
0020     dir=${dir}+${ism}
0021 fi
0022 
0023 datapath=$MELMDAT
0024 datadir=${datapath}/${dir}
0025 if [ -d $datadir ] 
0026 then
0027     echo '> Data directory exists: ' $datadir
0028 else
0029     echo '> Data directory does not exist: ' $datadir '. Return'
0030     return
0031 fi
0032 
0033 if [ -d ${topdir} ] 
0034 then
0035     echo '> Store directory exists: ' $dir
0036 else
0037     echo '> Check Top Directory first. Exit.'
0038     return
0039 fi
0040 
0041 dir=${topdir}/${dir}
0042 if [ -d ${dir} ] 
0043 then
0044     echo '> Store directory exists: ' $dir
0045 else
0046     echo '> Creating directory ' $dir
0047     mkdir $dir
0048 fi
0049 
0050 echo '> Get the lists of runs (Blue Laser, Red Laser, Test Pulse) for ' $dir
0051 $MUSECAL/getListOfRuns.pl $datadir $dir 
0052 
0053 echo '> Done.'
0054 
0055 return
0056 }
0057 
0058 echo 'Preparing list of runs for ECAL laser primitives'
0059 for i in 1 2
0060 do
0061   for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
0062   do
0063     prim $i $j
0064   done
0065 done
0066 for j in 1 2 3 4 5 6 7 8 9
0067 do
0068   prim 0 $j
0069 done
0070 for j in 1 2 3 4 5 6 7 8 9
0071 do
0072   prim 3 $j
0073 done