]> 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 ec54fd869cd9b2489ba04d97e918438670784558..6673be2bd978f34f8e62905c693bdf9124417124 100755 (executable)
@@ -7,45 +7,62 @@ 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
-export EXECFOLDER=$REPLY
+EXECFOLDER=$REPLY
 echo "Folder:    $EXECFOLDER"
 fi
 echo "local or lxplus (1=local 2=lxplus)   :[${TMPFOLDER}]"
 read
 if [ "$REPLY" != "" ]; then
-export TMPFOLDER=$REPLY
+TMPFOLDER=$REPLY
 fi
 if [ "$TMPFOLDER" == "1" ]; then
-export TMPPLACE='/tmp'
+TMPPLACE='/tmp'
 else
-export TMPPLACE='/tmp/$USERNAME'
+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 "
@@ -59,12 +76,12 @@ else
 mkdir $PASS
 cd $PASS
 fi
-time aliroot -l <<EOI|tee merge.log
+time aliroot -l <<EOI|tee merge$RUN.log
 EOF
-.x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}" ); 
+.x $EXECFOLDER/ReadQASDD.C($RUN,$YEAR,"${PERIOD}","${PASS}",$MAXFILES); 
 .q
 EOI
-time aliroot -l <<EOI|tee plot.log
+time aliroot -l <<EOI|tee plot$RUN.log
 .x $EXECFOLDER/PlotQASDD.C("File.QA.${YEAR}.${PERIOD}.${PASS}.Run.${RUN}.root");
 .q
 EOI
@@ -74,7 +91,7 @@ echo "directory images exists"
 else
 mkdir images
 fi
-mv *.ps *.eps images/.
+mv *.ps images/.
 cd images
 for i in  *.ps;
 do
@@ -83,4 +100,4 @@ sleep 2
 done
 echo "Plots Done!!"
 rm -rf $TMPPLACE/*.root
-cd ../../../
\ No newline at end of file
+cd ../../../