source: tags/Mars-V1.1/datacenter/tools/comparesequences

Last change on this file was 8380, checked in by hoehne, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.7 KB
Line 
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
28date=`date +.%Y.%m.%d.%H.%M.%S`
29olddb=MyMagic
30newdb=TestSequ2
31pw=d99swMT!
32host=vela
33
34query="select fRunNumber from RunData where fRunNumber > 32000";
35runs=`mysql -s -u MAGIC --password=$pw --host=$host MyMagic -e " $query "`
36
37for run in $runs
38do
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
56done
57
Note: See TracBrowser for help on using the repository browser.