forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathepos.sh
More file actions
executable file
·30 lines (25 loc) · 845 Bytes
/
epos.sh
File metadata and controls
executable file
·30 lines (25 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# Script based on CRMC example
# EPOS4 option files must contain ihepmc set to 2 to print HepMC
# data on stdout. -hepmc flag is not needed anymore, but -hepstd is fundamental
# in order not to print useless information on stdout (a z-*optns*.mtr file will be created)
optns="example"
seed=$RANDOM
while test $# -gt 0 ; do
case $1 in
-i|--input) optns=$2 ; shift ;;
-s|--seed) seed=$2 ; shift ;;
-h|--help) usage; exit 0 ;;
esac
shift
done
if [ ! -f $optns.optns ]; then
echo "Error: Options file $optns.optns not found"
exit 1
fi
if [ $seed -eq 0 ]; then
echo "Seed can't be 0, random number will be used"
seed=$RANDOM
fi
# Or filters the stdout with only HepMC2 useful data
$EPOS4_ROOT/epos4/scripts/epos -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'