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 "
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
else
mkdir images
fi
-mv *.ps *.eps images/.
+mv *.ps images/.
cd images
for i in *.ps;
do
done
echo "Plots Done!!"
rm -rf $TMPPLACE/*.root
-cd ../../../
\ No newline at end of file
+cd ../../../