source: trunk/DataCheck/Processing/FillNumEvts.sh@ 17054

Last change on this file since 17054 was 16674, checked in by Daniela Dorner, 11 years ago
use compiled version of macro
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2
3source `dirname $0`/../Sourcefile.sh
4printprocesslog "INFO starting "$0
5
6logfile=$runlogpath"/FillNumEvts-"$datetime".log"
7date >> $logfile
8
9# get current hour
10hour=`date +%k`
11if [ $hour -le 7 ] || [ $hour -ge 19 ]
12then
13 dates=( `date +%Y/%m/%d --date="-12hour"` )
14else
15 # get last 3, 6 or 9 nights
16 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
17 # `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
18 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
19 )
20fi
21
22#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
23
24#dates=( "2013/04/17" )
25
26printprocesslog "INFO processing the following night(s): "${dates[@]}
27echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
28
29#echo ${dates[@]}
30
31mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.29
32cd $mars
33
34# do filling of aux data
35for date in ${dates[@]}
36do
37 runnumber=`echo $date | sed -e 's/\///g'`
38
39 # data which are not processed in LP
40 if [ $runnumber -lt 20121212 ]
41 then
42 continue
43 fi
44
45 echo "run numevts.C for night "$runnumber" (run-wise processing) " >> $logfile 2>&1
46 printprocesslog "run numevts.C for night "$runnumber" (run-wise processing) "
47 printprocesslog "root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\)"
48 check1=`root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\) | tee $logfile | intgrep`
49
50 case $check1 in
51 1) printprocesslog "INFO filling numevts.C was successfully (check1=$check1)"
52 ;;
53 0) printprocesslog "WARN connection to DB failed in numevts.C (check1=$check1)"
54 ;;
55 *) printprocesslog "ERROR numevts.C failed (check1=$check1)"
56 ;;
57 esac
58
59 #echo "run numevts.C for night "$runnumber" (night-wise processing) "
60 #root -q -b -l fact/processing/numevts.C\("\"$runnumber"\"\,"\"$inpath"\"\,"\"$resulttable2"\"\,kFALSE\,kTRUE\)
61
62done
63
64finish
65
66
Note: See TracBrowser for help on using the repository browser.