File indexing completed on 2023-03-17 10:53:15
0001
0002
0003 rm index_selection.html
0004
0005 echo "11111111111111"
0006 runList=`cat ${1}`
0007
0008
0009 echo "22222222222"
0010
0011
0012
0013 runList=`echo "${runList}" | sed 'sk,k\ kg' | sed 'sk;k\ kg'`
0014 ok=1
0015 for r in ${runList} ; do
0016 if [ ! ${
0017 echo "run numbers are expected to be of length 6. Check <$r>"
0018 ok=0
0019 fi
0020 debug_loc=0
0021 if [ "$r" -eq "$r" ] 2>/dev/null ; then
0022 if [ ${debug_loc} -eq 1 ] ; then echo "run variable <$r> is a number (ok)"; fi
0023 else
0024 echo "error: run variable <$r> is not an integer number"
0025 ok=0
0026 fi
0027 done
0028 echo "333"
0029
0030
0031 if [ ${ok} -eq 0 ] ; then
0032 echo "errors in the file ${fileName} with run numbers"
0033 exit 3
0034 else
0035 if [ ${
0036 echo "run numbers in ${fileName} verified ok"
0037 fi
0038 fi
0039 echo "444"
0040 echo "555"
0041
0042
0043
0044
0045
0046
0047 echo "6"
0048
0049
0050
0051
0052
0053 runListEOS=`echo $runList | tee _runlist_`
0054
0055 echo "7"
0056
0057
0058
0059
0060
0061
0062
0063 echo "8"
0064
0065
0066
0067
0068
0069 for i in ${runListEOS} ; do
0070
0071 runnumber=${i}
0072
0073
0074
0075
0076
0077
0078
0079 echo "runnumber:"
0080 dasgoclient --query="file dataset=/HcalNZS/Commissioning2021-HcalCalMinBias-PromptReco-v1/ALCARECO run=${i} | grep file.size, file.nevents, file.modification_time " > tmp
0081
0082 echo "${runnumber}"
0083
0084
0085
0086
0087
0088 timetmp=`cat tmp | awk '{print $3}'`
0089
0090 type='NZS'
0091 timetmp2=`date -d @${timetmp} +%Y-%m-%d:%H-%M-%S`
0092 sizetmp=`cat tmp | awk '{print $1}'`
0093 neventstmp=`cat tmp | awk '{print $2}'`
0094 commentariy='Com21-ALCARECO'
0095
0096
0097
0098
0099
0100
0101
0102
0103 let "raw = (k % 2) + 2"
0104 echo '<tr>'>> index_selection.html
0105 echo '<td class="s1" align="center">'$k'</td>'>> index_selection.html
0106 echo '<td class="s'$raw'" align="center">'$runnumber'</td>'>> index_selection.html
0107 echo '<td class="s'$raw'" align="center">'$type'</td>'>> index_selection.html
0108 echo '<td class="s'$raw'" align="center">'$timetmp2'</td>'>> index_selection.html
0109 echo '<td class="s'$raw'" align="center">'$sizetmp'</td>'>> index_selection.html
0110 echo '<td class="s'$raw'" align="center">'$neventstmp'</td>'>> index_selection.html
0111 echo '<td class="s'$raw'" align="center">'$commentariy'</td>'>> index_selection.html
0112
0113 done
0114
0115 echo "9"
0116
0117 mv index_selection.html index_selectionNZS_ALCARECO.html
0118
0119
0120
0121
0122
0123
0124
0125 rm tmp
0126 rm \_runlist\_
0127
0128
0129 echo " done"