| 1 | #!/bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | # ========================================================================
|
|---|
| 4 | #
|
|---|
| 5 | # *
|
|---|
| 6 | # * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
|---|
| 7 | # * Software. It is distributed to you in the hope that it can be a useful
|
|---|
| 8 | # * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
|---|
| 9 | # * It is distributed WITHOUT ANY WARRANTY.
|
|---|
| 10 | # *
|
|---|
| 11 | # * Permission to use, copy, modify and distribute this software and its
|
|---|
| 12 | # * documentation for any purpose is hereby granted without fee,
|
|---|
| 13 | # * provided that the above copyright notice appear in all copies and
|
|---|
| 14 | # * that both that copyright notice and this permission notice appear
|
|---|
| 15 | # * in supporting documentation. It is provided "as is" without express
|
|---|
| 16 | # * or implied warranty.
|
|---|
| 17 | # *
|
|---|
| 18 | #
|
|---|
| 19 | #
|
|---|
| 20 | # Author(s): Daniela Dorner 05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
|
|---|
| 21 | #
|
|---|
| 22 | # Copyright: MAGIC Software Development, 2000-2006
|
|---|
| 23 | #
|
|---|
| 24 | #
|
|---|
| 25 | # ========================================================================
|
|---|
| 26 | #
|
|---|
| 27 |
|
|---|
| 28 | date=`date +.%Y.%m.%d.%H.%M.%S`
|
|---|
| 29 | olddb=MyMagic
|
|---|
| 30 | newdb=TestSequ2
|
|---|
| 31 | pw=d99swMT!
|
|---|
| 32 | host=vela
|
|---|
| 33 |
|
|---|
| 34 | query="select fRunNumber from RunData where fRunNumber > 32000";
|
|---|
| 35 | runs=`mysql -s -u MAGIC --password=$pw --host=$host MyMagic -e " $query "`
|
|---|
| 36 |
|
|---|
| 37 | for run in $runs
|
|---|
| 38 | do
|
|---|
| 39 | query="select fSequenceFirst from RunData where fRunNumber=$run"
|
|---|
| 40 | s1=`mysql -s -u MAGIC --password=$pw --host=$host $olddb -e " $query "`
|
|---|
| 41 | s2=`mysql -s -u test --password=Ics+eaTD --host=$host $newdb -e " $query "`
|
|---|
| 42 | if [ $s1 -eq 0 ] && [ $s2 -eq 0 ]
|
|---|
| 43 | then
|
|---|
| 44 | continue
|
|---|
| 45 | fi
|
|---|
| 46 | if [ $s1 -eq $s2 ]
|
|---|
| 47 | then
|
|---|
| 48 | continue
|
|---|
| 49 | fi
|
|---|
| 50 | echo "run: $run sequ#: $s1 -> $s2"
|
|---|
| 51 | echo "run: $run sequ#: $s1 -> $s2" >> sequ.changes$date
|
|---|
| 52 | if [ $s2 -eq 0 ]
|
|---|
| 53 | then
|
|---|
| 54 | echo "run: $run sequ#: $s1 -> $s2" >> not-sequenced.anymore$date
|
|---|
| 55 | fi
|
|---|
| 56 | done
|
|---|
| 57 |
|
|---|