Last change
on this file since 15388 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 | #
|
---|
3 | source `dirname $0`/../Sourcefile.sh
|
---|
4 | printprocesslog "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
|
---|
9 | export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
|
---|
10 |
|
---|
11 | cd $mars
|
---|
12 |
|
---|
13 | if ! [ "$1" = "min" ] && ! [ "$1" = "nights" ]
|
---|
14 | then
|
---|
15 | echo "wrong option "$1" (only min and nights valid)."
|
---|
16 | finish
|
---|
17 | fi
|
---|
18 |
|
---|
19 | if [ "$1" = "min" ]
|
---|
20 | then
|
---|
21 | date=`date --date="-18HOUR" +%Y/%m/%d`
|
---|
22 | fi
|
---|
23 |
|
---|
24 | #anapath=/loc_data/analysis
|
---|
25 |
|
---|
26 | # source info on daq in /loc_data/analysis/sources.txt
|
---|
27 | # (dump of DB scheduling.sources)
|
---|
28 | sources=( 1 2 5 7 11 )
|
---|
29 |
|
---|
30 | for source in ${sources[@]}
|
---|
31 | do
|
---|
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/
|
---|
59 | done
|
---|
60 |
|
---|
61 |
|
---|
62 | finish
|
---|
63 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.