]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/macrosSDD/ShowSDDQA.sh
ec54fd869cd9b2489ba04d97e918438670784558
[u/mrichter/AliRoot.git] / ITS / macrosSDD / ShowSDDQA.sh
1 #!/bin/bash
2 RUN='123456'
3 PERIOD='LHC10a'
4 PASS='pass1'
5 YEAR='2010'
6 ALICE_ITS='$ALICE_ROOT/ITS'
7 TMPPLACE='/tmp'
8 TMPFOLDER='1'
9 EXECFOLDER='$HOME/macroQAshifter'
10 echo "Run Number   :[${RUN}]"
11 read
12 if [ "$REPLY" != "" ]; then
13 export RUN=$REPLY
14 echo "Run   $RUN"
15 fi
16 echo "Period        :[${PERIOD}]"
17 read
18 if [ "$REPLY" != "" ]; then 
19 export PERIOD=$REPLY
20 echo "Period  $PERIOD"
21 fi
22 echo "Pass           : [${PASS}]"
23 read
24 if [ "$REPLY" != "" ]; then
25 export PASS=$REPLY
26 echo "Pass       $PASS "
27 fi
28 echo "Year      :[${YEAR}]"
29 read
30 if [ "$REPLY" != "" ]; then
31 export YEAR=$REPLY
32 echo "Year    $YEAR"
33 fi
34 echo "folder with macros     :[${EXECFOLDER}]"
35 read
36 if [ "$REPLY" != "" ]; then
37 export EXECFOLDER=$REPLY
38 echo "Folder:    $EXECFOLDER"
39 fi
40 echo "local or lxplus (1=local 2=lxplus)   :[${TMPFOLDER}]"
41 read
42 if [ "$REPLY" != "" ]; then
43 export TMPFOLDER=$REPLY
44 fi
45 if [ "$TMPFOLDER" == "1" ]; then
46 export TMPPLACE='/tmp'
47 else
48 export TMPPLACE='/tmp/$USERNAME'
49 fi
50 if [ ls -l "run$RUN" >/dev/null 2>&1 ]; then
51 echo "directory run$RUN exists "
52 else
53 mkdir "run$RUN"
54 fi
55 cd "run$RUN"
56 if [ ls -l $PASS > /dev/null 2>&1 ]; then
57 echo "directory $PASS exixsts"
58 else
59 mkdir $PASS
60 cd $PASS
61 fi
62 time aliroot -l <<EOI|tee merge.log
63 EOF
64 .x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}" ); 
65 .q
66 EOI
67 time aliroot -l <<EOI|tee plot.log
68 .x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
69 .q
70 EOI
71 rm File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root
72 if [ls -l "images" >/dev/null 2>&1 ]; then
73 echo "directory images exists"
74 else
75 mkdir images
76 fi
77 mv *.ps *.eps images/.
78 cd images
79 for i in  *.ps;
80 do
81 gv $i & 
82 sleep 2
83 done
84 echo "Plots Done!!"
85 rm -rf $TMPPLACE/*.root
86 cd ../../../