fixed the tainted variables
[u/mrichter/AliRoot.git] / ITS / ShowSDDQA.sh
1 #!/bin/bash
2 RUN='123456'
3 PERIOD='LHC10a'
4 PASS='pass1'
5 YEAR='2010'
6 ALICE_ITS='$ALICE_ROOT/ITS'
7 echo "Run Number   :[${RUN}]"
8 read
9 if [ "$REPLY" != "" ]; then
10 export RUN=$REPLY
11 echo "Run   $RUN"
12 fi
13 echo "Period        :[${PERIOD}]"
14 read
15 if [ "$REPLY" != "" ]; then 
16 export PERIOD=$REPLY
17 echo "Period  $PERIOD"
18 fi
19 echo "Pass           : [${PASS}]"
20 read
21 if [ "$REPLY" != "" ]; then
22 export PASS=$REPLY
23 echo "Pass       $PASS "
24 fi
25 echo "Year      :[${YEAR}]"
26 read
27 if [ "$REPLY" != "" ]; then
28 export YEAR=$REPLY
29 echo "Year    $YEAR"
30 fi
31 if [ ls -l "run$RUN" >/dev/null 2>&1 ]; then
32 echo "directory run$RUN exists "
33 else
34 mkdir "run$RUN"
35 fi
36 cd "run$RUN"
37 if [ ls -l $PASS > /dev/null 2>&1 ]; then
38 echo "directory $PASS exixsts"
39 else
40 mkdir $PASS
41 cd $PASS
42 fi
43 time aliroot >>merge.log 2>&1 <<EOI
44 .x $ALICE_ITS/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}" ); 
45 .q
46 EOI
47 time aliroot  >> plot.log 2>&1 <<EOI
48 .x $ALICE_ITS/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
49 EOI
50
51 if [ls -l "images" >/dev/null 2>&1 ]; then
52 echo "directory images exists"
53 else
54 mkdir images
55 fi
56 mv *.ps *.eps images/.
57 cd images
58 for i in  *.ps;
59 do
60 gv $i & 
61 sleep 2
62 done
63 echo "Plots Done!!"
64