| 1 | #!/bin/bash
|
|---|
| 2 |
|
|---|
| 3 | source `dirname $0`/../Sourcefile.sh
|
|---|
| 4 | printprocesslog "INFO starting "$0
|
|---|
| 5 |
|
|---|
| 6 | logfile=$runlogpath"/FillNumEvts-"$datetime".log"
|
|---|
| 7 | date >> $logfile
|
|---|
| 8 |
|
|---|
| 9 | # get last 3, 6 or 9 nights
|
|---|
| 10 | dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
|
|---|
| 11 | # `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
|
|---|
| 12 | # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
|
|---|
| 13 | )
|
|---|
| 14 | #dates=( `find -L $auxdata -mindepth 3 -type d | sort -r | grep -v bad | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
|
|---|
| 15 |
|
|---|
| 16 | #dates=( "2013/04/17" )
|
|---|
| 17 |
|
|---|
| 18 | printprocesslog "INFO processing the following night(s): "${dates[@]}
|
|---|
| 19 | echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
|
|---|
| 20 |
|
|---|
| 21 | echo ${dates[@]}
|
|---|
| 22 |
|
|---|
| 23 | mars=/home/fact/Mars
|
|---|
| 24 | cd $mars
|
|---|
| 25 | pwd
|
|---|
| 26 | # use macro from different mars version until versions are sorted out
|
|---|
| 27 | mars2=/home/fact/SW.automatic.processing/Mars.svn.2013.04.12
|
|---|
| 28 |
|
|---|
| 29 | # do filling of aux data
|
|---|
| 30 | for date in ${dates[@]}
|
|---|
| 31 | do
|
|---|
| 32 | runnumber=`echo $date | sed -e 's/\///g'`
|
|---|
| 33 |
|
|---|
| 34 | # data which are not processed in LP
|
|---|
| 35 | if [ $runnumber -lt 20121212 ]
|
|---|
| 36 | then
|
|---|
| 37 | continue
|
|---|
| 38 | fi
|
|---|
| 39 |
|
|---|
| 40 | echo "run numevts.C for night "$runnumber" (run-wise processing) "
|
|---|
| 41 | printprocesslog "run numevts.C for night "$runnumber" (run-wise processing) "
|
|---|
| 42 | printprocesslog "root -q -b -l $mars2/fact/processing/numevents.C\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\)"
|
|---|
| 43 | root -q -b -l $mars2/fact/processing/numevents.C\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\)
|
|---|
| 44 |
|
|---|
| 45 | #echo "run numevts.C for night "$runnumber" (night-wise processing) "
|
|---|
| 46 | #root -q -b -l fact/processing/numevts.C\("\"$runnumber"\"\,"\"$inpath"\"\,"\"$resulttable2"\"\,kFALSE\,kTRUE\)
|
|---|
| 47 |
|
|---|
| 48 | done
|
|---|
| 49 |
|
|---|
| 50 | finish
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|