File indexing completed on 2024-04-06 12:18:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 plotMacro=./saveHistograms.C
0012 defaultXsize=480
0013 defaultYsize=360
0014
0015 printUsage() {
0016 echo
0017 echo "Saves all histograms from a root file into images"
0018 echo "Usage: saveHistograms file.root"
0019 echo " saveHistograms file.root imageType"
0020 echo " saveHistograms file.root imageType xSize ySize"
0021 echo "example:"
0022 echo " saveHistograms jets.root gif $defaultXsize $defaultYsize"
0023 }
0024
0025 saveHistFromRootFile() {
0026 rootFile=$1
0027 imageType=$2
0028 xSize=$3
0029 ySize=$4
0030
0031 echo "Saving histograms from $rootFile as $xSize x $ySize $imageType images."
0032
0033 root -b -l -q "$plotMacro(\"$rootFile\",\"$imageType\",$xSize,$ySize)"
0034 }
0035
0036
0037 if [ $
0038
0039
0040
0041
0042 printUsage
0043 exit 2
0044 else
0045 rootFile=$1
0046 imageType="gif"
0047 xSize=$defaultXsize
0048 ySize=$defaultYsize
0049 fi
0050
0051 if [ $
0052 rootFile=$1
0053 fi
0054 if [ $
0055 imageType=$2
0056 fi
0057 if [ $
0058 xSize=$3
0059 ySize=$4
0060 fi
0061
0062 saveHistFromRootFile $rootFile $imageType $xSize $ySize