6
if [[ "$1" == "" ]]; then
7
echo 'Path to MadAnalysis and topdrawer must be given to plot'
14
if [[ -x $MAdir/plot_events ]]; then
15
echo 'plot_events found'
17
echo 'plot_events not found'
21
if [[ -x $td/td ]]; then
22
echo 'topdrawer found'
23
# This is needed for Mac OS X
24
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$td
26
echo 'topdrawer not found'
30
if [[ -x $MAdir/epstosmth ]]; then
31
echo 'epstosmth found'
33
echo 'epstosmth not found'
37
#if [[ -e events.list ]]; then
38
# echo 'events.list found'
40
# echo 'events.list not found'
44
if [[ -e ../../../Cards/plot_card.dat ]]; then
45
echo 'plot_card found'
46
cp ../../../Cards/plot_card.dat ./ma_card.dat
48
echo 'plot_card not found'
52
#$MAdir/plot_events < events.list
54
echo 'end plot_events'
56
#$td/td -device=ps plots.top -sideways
58
csplit -ks -n 3 -f ma_plot plots.top "/ NEW PLOT/" '{250}'
60
for file in ma_plot??? ; do
61
echo ">> Converting topdrawer file $file to postscript" >> log.convert
62
# $td/td -device=ps $file -sideways
64
echo "SET DEVICE POSTSCRIPT ORIENT=3" > $file\.top
65
cat $file >> $file\.top
69
for file in ma_plot???.ps ; do
70
echo ">> Converting file $file" >> log.convert
71
$MAdir/epstosmth --gsopt='-r60x60 -dGraphicsAlphaBits=4' --gsdev=jpeg $file