#!/bin/bash

count=`find . -name '*z.tl' -printf '.' | wc -m`
if [ $count -eq 0 ] ; then
   echo "No Touschek lifetime files found. Did you run computeLifetime?"
   exit
fi

sddsplot -col=BunchNumber,tLifetimeAve,tLifetimeStDev -graph=error,vary=subtype *z.tl -legend=file,edit=3Z-%/.tl//
