]>
Commit | Line | Data |
---|---|---|
0bca1a77 | 1 | #!/bin/bash |
2 | RUN='123456' | |
3 | PERIOD='LHC10a' | |
4 | PASS='pass1' | |
5 | YEAR='2010' | |
6 | ALICE_ITS='$ALICE_ROOT/ITS' | |
2a250bc5 | 7 | TMPPLACE='/tmp' |
8 | TMPFOLDER='1' | |
9 | EXECFOLDER='$HOME/macroQAshifter' | |
88522cc1 | 10 | MAXFILES='300' |
0bca1a77 | 11 | echo "Run Number :[${RUN}]" |
12 | read | |
13 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 14 | RUN=$REPLY |
0bca1a77 | 15 | echo "Run $RUN" |
16 | fi | |
17 | echo "Period :[${PERIOD}]" | |
18 | read | |
19 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 20 | PERIOD=$REPLY |
0bca1a77 | 21 | echo "Period $PERIOD" |
22 | fi | |
23 | echo "Pass : [${PASS}]" | |
24 | read | |
25 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 26 | PASS=$REPLY |
0bca1a77 | 27 | echo "Pass $PASS " |
28 | fi | |
29 | echo "Year :[${YEAR}]" | |
30 | read | |
31 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 32 | YEAR=$REPLY |
0bca1a77 | 33 | echo "Year $YEAR" |
34 | fi | |
2a250bc5 | 35 | echo "folder with macros :[${EXECFOLDER}]" |
36 | read | |
37 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 38 | EXECFOLDER=$REPLY |
2a250bc5 | 39 | echo "Folder: $EXECFOLDER" |
40 | fi | |
41 | echo "local or lxplus (1=local 2=lxplus) :[${TMPFOLDER}]" | |
42 | read | |
43 | if [ "$REPLY" != "" ]; then | |
88522cc1 | 44 | TMPFOLDER=$REPLY |
2a250bc5 | 45 | fi |
46 | if [ "$TMPFOLDER" == "1" ]; then | |
88522cc1 | 47 | TMPPLACE='/tmp' |
2a250bc5 | 48 | else |
88522cc1 | 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" | |
2a250bc5 | 66 | fi |
0bca1a77 | 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 | |
88522cc1 | 79 | time aliroot -l <<EOI|tee merge$RUN.log |
2a250bc5 | 80 | EOF |
88522cc1 | 81 | .x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}",$MAXFILES); |
0bca1a77 | 82 | .q |
83 | EOI | |
88522cc1 | 84 | time aliroot -l <<EOI|tee plot$RUN.log |
2a250bc5 | 85 | .x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root"); |
86 | .q | |
0bca1a77 | 87 | EOI |
2a250bc5 | 88 | rm File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root |
0bca1a77 | 89 | if [ls -l "images" >/dev/null 2>&1 ]; then |
90 | echo "directory images exists" | |
91 | else | |
92 | mkdir images | |
93 | fi | |
88522cc1 | 94 | mv *.ps images/. |
0bca1a77 | 95 | cd images |
96 | for i in *.ps; | |
97 | do | |
98 | gv $i & | |
99 | sleep 2 | |
100 | done | |
101 | echo "Plots Done!!" | |
2a250bc5 | 102 | rm -rf $TMPPLACE/*.root |
88522cc1 | 103 | cd ../../../ |