source: trunk/DataCheck/QuickLook/Step3.sh@ 15369

Last change on this file since 15369 was 15308, checked in by Daniela Dorner, 12 years ago
added (script to run third step of the quick look analysis: light curve)
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3source `dirname $0`/../Sourcefile.sh
4printprocesslog "INFO starting $0 $1"
5
6#root=/opt/root_svn/bin/thisroot.sh
7#source $root
8#factpath=/home/fact/FACT++.in-run-fad-loss
9export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
10
11cd $mars
12
13if ! [ "$1" = "min" ] && ! [ "$1" = "nights" ]
14then
15 echo "wrong option "$1" (only min and nights valid)."
16 finish
17fi
18
19if [ "$1" = "min" ]
20then
21 date=`date --date="-18HOUR" +%Y/%m/%d`
22fi
23
24#anapath=/loc_data/analysis
25
26# source info on daq in /loc_data/analysis/sources.txt
27# (dump of DB scheduling.sources)
28sources=( 1 2 5 7 11 )
29
30for source in ${sources[@]}
31do
32 dirs=( `find $anapath/$source/ganymed*$1 -maxdepth 0 -type d 2>/dev/null` )
33 if [ ${#dirs[@]} -eq 0 ]
34 then
35 printprocesslog "INFO no directories ("$1") found for source "$source
36 continue
37 fi
38 for dir in ${dirs[@]}
39 do
40 printprocesslog "INFO processing files in "$dir
41 inpath=$dir
42 outpath=`echo $dir | sed -e 's/ganymed/lightcurve/'`
43 logfile=$outpath/lightcurve.log
44 makedir $outpath
45 printprocesslog "INFO starting lightcurve.C+ for path "$inpath
46
47 check1=`root -q -b $anapath/lightcurve.C+\("\"$inpath\""\,"\"$outpath\"","\"$date\""\) | tee $logfile | intgrep`
48
49 case $check1 in
50 0) printprocesslog "INFO lightcurve.C was successful for path "$inpath" (check1=$check1)"
51 ./showplot -b --save-as-png $outpath/lc.root
52 ;;
53 *) printprocesslog "ERROR lightcurve.C failed for dataset "$inpath" (check1=$check1)"
54 ;;
55 esac
56 done
57 printprocesslog "INFO rsync output of source "$source" to gate."
58 rsync -av $anapath/$source/lightcurve* gate:/home/factwww/lightcurves/$source/
59done
60
61
62finish
63
Note: See TracBrowser for help on using the repository browser.