]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/macrosSDD/ShowSDDQA.sh
New plot for trending dE/dx on Lay3 and Lay4 separately
[u/mrichter/AliRoot.git] / ITS / macrosSDD / ShowSDDQA.sh
CommitLineData
0bca1a77 1#!/bin/bash
2RUN='123456'
3PERIOD='LHC10a'
4PASS='pass1'
5YEAR='2010'
6ALICE_ITS='$ALICE_ROOT/ITS'
2a250bc5 7TMPPLACE='/tmp'
8TMPFOLDER='1'
9EXECFOLDER='$HOME/macroQAshifter'
88522cc1 10MAXFILES='300'
0bca1a77 11echo "Run Number :[${RUN}]"
12read
13if [ "$REPLY" != "" ]; then
88522cc1 14RUN=$REPLY
0bca1a77 15echo "Run $RUN"
16fi
17echo "Period :[${PERIOD}]"
18read
19if [ "$REPLY" != "" ]; then
88522cc1 20PERIOD=$REPLY
0bca1a77 21echo "Period $PERIOD"
22fi
23echo "Pass : [${PASS}]"
24read
25if [ "$REPLY" != "" ]; then
88522cc1 26PASS=$REPLY
0bca1a77 27echo "Pass $PASS "
28fi
29echo "Year :[${YEAR}]"
30read
31if [ "$REPLY" != "" ]; then
88522cc1 32YEAR=$REPLY
0bca1a77 33echo "Year $YEAR"
34fi
2a250bc5 35echo "folder with macros :[${EXECFOLDER}]"
36read
37if [ "$REPLY" != "" ]; then
88522cc1 38EXECFOLDER=$REPLY
2a250bc5 39echo "Folder: $EXECFOLDER"
40fi
41echo "local or lxplus (1=local 2=lxplus) :[${TMPFOLDER}]"
42read
43if [ "$REPLY" != "" ]; then
88522cc1 44TMPFOLDER=$REPLY
2a250bc5 45fi
46if [ "$TMPFOLDER" == "1" ]; then
88522cc1 47TMPPLACE='/tmp'
2a250bc5 48else
88522cc1 49TMPPLACE='/tmp/$USERNAME'
50fi
51GOOD=130
52echo "Max number of files (Insert a number >0) :[${MAXFILES}]"
53read
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
63if [ "$REPLY" != "" ]; then
64MAXFILES=$REPLY
65echo "Max number of files: $MAXFILES"
2a250bc5 66fi
0bca1a77 67if [ ls -l "run$RUN" >/dev/null 2>&1 ]; then
68echo "directory run$RUN exists "
69else
70mkdir "run$RUN"
71fi
72cd "run$RUN"
73if [ ls -l $PASS > /dev/null 2>&1 ]; then
74echo "directory $PASS exixsts"
75else
76mkdir $PASS
77cd $PASS
78fi
88522cc1 79time aliroot -l <<EOI|tee merge$RUN.log
2a250bc5 80EOF
88522cc1 81.x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}",$MAXFILES);
0bca1a77 82.q
83EOI
88522cc1 84time aliroot -l <<EOI|tee plot$RUN.log
2a250bc5 85.x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
86.q
0bca1a77 87EOI
2a250bc5 88rm File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root
0bca1a77 89if [ls -l "images" >/dev/null 2>&1 ]; then
90echo "directory images exists"
91else
92mkdir images
93fi
88522cc1 94mv *.ps images/.
0bca1a77 95cd images
96for i in *.ps;
97do
98gv $i &
99sleep 2
100done
101echo "Plots Done!!"
2a250bc5 102rm -rf $TMPPLACE/*.root
88522cc1 103cd ../../../