]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/macrosSDD/ShowSDDQA.sh
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ITS / macrosSDD / ShowSDDQA.sh
index 09dee57e665fa5bed110897a6728357854a9e744..6673be2bd978f34f8e62905c693bdf9124417124 100755 (executable)
@@ -4,30 +4,66 @@ PERIOD='LHC10a'
 PASS='pass1'
 YEAR='2010'
 ALICE_ITS='$ALICE_ROOT/ITS'
+TMPPLACE='/tmp'
+TMPFOLDER='1'
+EXECFOLDER='$HOME/macroQAshifter'
+MAXFILES='300'
 echo "Run Number   :[${RUN}]"
 read
 if [ "$REPLY" != "" ]; then
-export RUN=$REPLY
+RUN=$REPLY
 echo "Run   $RUN"
 fi
 echo "Period        :[${PERIOD}]"
 read
 if [ "$REPLY" != "" ]; then 
-export PERIOD=$REPLY
+PERIOD=$REPLY
 echo "Period  $PERIOD"
 fi
 echo "Pass           : [${PASS}]"
 read
 if [ "$REPLY" != "" ]; then
-export PASS=$REPLY
+PASS=$REPLY
 echo "Pass       $PASS "
 fi
 echo "Year      :[${YEAR}]"
 read
 if [ "$REPLY" != "" ]; then
-export YEAR=$REPLY
+YEAR=$REPLY
 echo "Year    $YEAR"
 fi
+echo "folder with macros     :[${EXECFOLDER}]"
+read
+if [ "$REPLY" != "" ]; then
+EXECFOLDER=$REPLY
+echo "Folder:    $EXECFOLDER"
+fi
+echo "local or lxplus (1=local 2=lxplus)   :[${TMPFOLDER}]"
+read
+if [ "$REPLY" != "" ]; then
+TMPFOLDER=$REPLY
+fi
+if [ "$TMPFOLDER" == "1" ]; then
+TMPPLACE='/tmp'
+else
+TMPPLACE='/tmp/$USERNAME'
+fi
+GOOD=130
+echo "Max number of files (Insert a number >0)   :[${MAXFILES}]"
+read
+#case $REPLY in
+#      *[a-zA-Z]*|*[!0-9]*|*[-]*)
+#                                  echo "Wrong: it is not a number > 0";;   
+#                        *[0-9]*)
+#                                 MAXFILES=$REPLY
+#                                 echo "Max number of files:    $MAXFILES" 
+#                                 export GOOD=0
+#                      ;;
+#esac  
+if [ "$REPLY" != "" ]; then
+MAXFILES=$REPLY
+echo "Max number of files:    $MAXFILES"
+fi
 if [ ls -l "run$RUN" >/dev/null 2>&1 ]; then
 echo "directory run$RUN exists "
 else
@@ -40,20 +76,22 @@ else
 mkdir $PASS
 cd $PASS
 fi
-time aliroot >>merge.log 2>&1 <<EOI
-.x $ALICE_ITS/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}" ); 
+time aliroot -l <<EOI|tee merge$RUN.log
+EOF
+.x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}",$MAXFILES); 
 .q
 EOI
-time aliroot  >> plot.log 2>&1 <<EOI
-.x $ALICE_ITS/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
+time aliroot -l <<EOI|tee plot$RUN.log
+.x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
+.q
 EOI
-
+rm File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root
 if [ls -l "images" >/dev/null 2>&1 ]; then
 echo "directory images exists"
 else
 mkdir images
 fi
-mv *.ps *.eps images/.
+mv *.ps images/.
 cd images
 for i in  *.ps;
 do
@@ -61,4 +99,5 @@ gv $i &
 sleep 2
 done
 echo "Plots Done!!"
-
+rm -rf $TMPPLACE/*.root
+cd ../../../