~maddevelopers/mg5amcnlo/WWW5_caching

« back to all changes in this revision

Viewing changes to users/mardelcourt/PROC_427003/PROC_427003/bin/internal/plot

  • Committer: John Doe
  • Date: 2013-03-25 20:27:02 UTC
  • Revision ID: john.doe@gmail.com-20130325202702-5sk3t1r8h33ca4p4
first clean version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
 
 
4
 
 
5
 
 
6
if [[  "$1" == ""  ]]; then
 
7
    echo 'Path to MadAnalysis and topdrawer must be given to plot'
 
8
    exit 
 
9
else
 
10
     MAdir=$1
 
11
     td=$2
 
12
fi
 
13
 
 
14
if [[ -x $MAdir/plot_events ]]; then
 
15
    echo 'plot_events found'
 
16
else
 
17
    echo 'plot_events not found'
 
18
    exit
 
19
fi
 
20
 
 
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
 
25
else
 
26
    echo 'topdrawer not found'
 
27
    exit
 
28
fi
 
29
 
 
30
if [[ -x $MAdir/epstosmth ]]; then
 
31
    echo 'epstosmth found'
 
32
else
 
33
    echo 'epstosmth not found'
 
34
    exit
 
35
fi
 
36
 
 
37
#if [[ -e events.list ]]; then
 
38
#    echo 'events.list found'
 
39
#else
 
40
#    echo 'events.list not found'
 
41
#    exit
 
42
#fi
 
43
 
 
44
if [[ -e ../../../Cards/plot_card.dat ]]; then
 
45
    echo 'plot_card found'
 
46
    cp ../../../Cards/plot_card.dat ./ma_card.dat
 
47
else
 
48
    echo 'plot_card not found'
 
49
    exit
 
50
fi
 
51
 
 
52
#$MAdir/plot_events < events.list
 
53
 
 
54
echo 'end plot_events'
 
55
 
 
56
#$td/td -device=ps plots.top -sideways
 
57
$td/td plots.top 
 
58
csplit -ks -n 3 -f ma_plot plots.top "/   NEW PLOT/" '{250}'
 
59
    
 
60
for file in ma_plot??? ; do
 
61
  echo ">> Converting topdrawer file $file to postscript" >> log.convert
 
62
#  $td/td -device=ps $file -sideways
 
63
  rm -f $file\.top
 
64
  echo "SET DEVICE POSTSCRIPT ORIENT=3" > $file\.top
 
65
  cat $file >> $file\.top
 
66
  $td/td $file\.top
 
67
done
 
68
 
 
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
 
72
done
 
73