1- #! /bin/bash
1+ #! /usr/ bin/bash
22
33inp=events.hepmc
44seed=$RANDOM
77
88usage ()
99{
10- cat << - EOF
11- Usage: $0 [OPTIONS]
10+ cat << EOF
11+ Usage: $0 [OPTIONS]
1212
13- Options:
13+ Options:
1414
15- -i,--input FILENAME Input HepMC file ($inp )
16- -s,--seed SEED Random number seed ($seed )
17- -n,--nevents EVENTS Number of events ($nev )
18- -o,--output NAME Ouptut name
19- -- Rest of command line sent to o2-sim
15+ -i,--input FILENAME Input HepMC file ($inp )
16+ -s,--seed SEED Random number seed ($seed )
17+ -n,--nevents EVENTS Number of events ($nev )
18+ -o,--output NAME Ouptut name
19+ -- Rest of command line sent to o2-sim
2020
21- Below follows the help output of o2-sim
21+ Below follows the help output of o2-sim
2222
23- EOF
23+ EOF
2424}
2525
2626while test $# -gt 0 ; do
2727 case $1 in
28- -i|--input) inp=$2 ; shift ;;
29- -s|--seed) seed=$2 ; shift ;;
30- -n|--nevents) nev=$2 ; shift ;;
31- -o|--output) out=$2 ; shift ;;
32- -h|--help) usage; o2-sim --help full ; exit 0 ;;
33- --) shift ; break ;;
34- * ) echo " Unknown option '$1 ', did you forget '--'?" > /dev/stderr
35- exit 1
36- ;;
28+ -i|--input) inp=$2 ; shift ;;
29+ -s|--seed) seed=$2 ; shift ;;
30+ -n|--nevents) nev=$2 ; shift ;;
31+ -o|--output) out=$2 ; shift ;;
32+ -h|--help) usage; o2-sim --help full ; exit 0 ;;
33+ --) shift ; break ;;
34+ * ) echo " Unknown option '$1 ', did you forget '--'?" > /dev/stderr
35+ exit 1
36+ ;;
3737 esac
3838 shift
3939done
@@ -43,7 +43,7 @@ if test "x$out" = "x" ; then
4343fi
4444out=` echo " $out " | tr ' ' ' _' `
4545
46- export VMCWORKDIR=${O2_ROOT} /share
46+ export VMCWORKDIR=${O2_ROOT} /share
4747o2-sim -g hepmc --configKeyValues " HepMC.fileName=$inp " \
4848 --outPrefix " $out " --seed $seed --nEvents $nev $@
4949
0 commit comments