]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/macrosSDD/ShowSDDQA.sh
Updated macros for SDD QA checks (M. Siciliano)
[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 MAXFILES='300'
11 echo "Run Number   :[${RUN}]"
12 read
13 if [ "$REPLY" != "" ]; then
14 RUN=$REPLY
15 echo "Run   $RUN"
16 fi
17 echo "Period        :[${PERIOD}]"
18 read
19 if [ "$REPLY" != "" ]; then 
20 PERIOD=$REPLY
21 echo "Period  $PERIOD"
22 fi
23 echo "Pass           : [${PASS}]"
24 read
25 if [ "$REPLY" != "" ]; then
26 PASS=$REPLY
27 echo "Pass       $PASS "
28 fi
29 echo "Year      :[${YEAR}]"
30 read
31 if [ "$REPLY" != "" ]; then
32 YEAR=$REPLY
33 echo "Year    $YEAR"
34 fi
35 echo "folder with macros     :[${EXECFOLDER}]"
36 read
37 if [ "$REPLY" != "" ]; then
38 EXECFOLDER=$REPLY
39 echo "Folder:    $EXECFOLDER"
40 fi
41 echo "local or lxplus (1=local 2=lxplus)   :[${TMPFOLDER}]"
42 read
43 if [ "$REPLY" != "" ]; then
44 TMPFOLDER=$REPLY
45 fi
46 if [ "$TMPFOLDER" == "1" ]; then
47 TMPPLACE='/tmp'
48 else
49 TMPPLACE='/tmp/$USERNAME'
50 fi
51 GOOD=130
52 echo "Max number of files (Insert a number >0)   :[${MAXFILES}]"
53 read
54 #case $REPLY in
55 #       *[a-zA-Z]*|*[!0-9]*|*[-]*)
56 #                                   echo "Wrong: it is not a number > 0";;   
57 #                         *[0-9]*)
58 #                                  MAXFILES=$REPLY
59 #                                  echo "Max number of files:    $MAXFILES" 
60 #                                  export GOOD=0
61 #                       ;;
62 #esac   
63 if [ "$REPLY" != "" ]; then
64 MAXFILES=$REPLY
65 echo "Max number of files:    $MAXFILES"
66 fi
67 if [ ls -l "run$RUN" >/dev/null 2>&1 ]; then
68 echo "directory run$RUN exists "
69 else
70 mkdir "run$RUN"
71 fi
72 cd "run$RUN"
73 if [ ls -l $PASS > /dev/null 2>&1 ]; then
74 echo "directory $PASS exixsts"
75 else
76 mkdir $PASS
77 cd $PASS
78 fi
79 time aliroot -l <<EOI|tee merge$RUN.log
80 EOF
81 .x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}",$MAXFILES); 
82 .q
83 EOI
84 time aliroot -l <<EOI|tee plot$RUN.log
85 .x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
86 .q
87 EOI
88 rm File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root
89 if [ls -l "images" >/dev/null 2>&1 ]; then
90 echo "directory images exists"
91 else
92 mkdir images
93 fi
94 mv *.ps images/.
95 cd images
96 for i in  *.ps;
97 do
98 gv $i & 
99 sleep 2
100 done
101 echo "Plots Done!!"
102 rm -rf $TMPPLACE/*.root
103 cd ../../../