forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrundpl.sh
More file actions
executable file
·54 lines (42 loc) · 1.62 KB
/
rundpl.sh
File metadata and controls
executable file
·54 lines (42 loc) · 1.62 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
#
# This is a simple example script to bypass the Hyperloop limitations in using
# external generators only, by switching the generator to the hybrid mode
# This script works only with updated O2sim version containing the switchExtToHybrid option
[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 2
[ ! "${O2DPG_MC_CONFIG_ROOT}" ] && echo "Error: This needs O2DPG loaded" && exit 2
NEV=5
# Two example ini configurations are provided pointing to different hybrid JSON files
# One creates a cocktail based on Pythia8, while the other generates sequentially EPOS4 and boxgen events
ini="${O2_ROOT}/examples/ExternalToHybrid/GeneratorHyperloopHybridCocktail.ini"
usage()
{
cat <<EOF
Usage: $0 [OPTIONS]
Options:
-i,--ini INI Configuration ini file ($ini)
-n,--nevents EVENTS Number of events ($nev)
-h,--help Print these instructions
-- Rest of command line sent to o2-sim
COMMAND must be quoted if it contains spaces or other special
characters
Below follows the help output of o2-sim-dpl-eventgen
EOF
}
if [ "$#" -lt 2 ]; then
echo "Running with default values"
fi
while test $# -gt 0 ; do
case $1 in
-i|--ini) ini="$2" ; shift ;;
-n|--nevents) NEV=$2 ; shift ;;
-h|--help) usage; o2-sim-dpl-eventgen --help full ; exit 0 ;;
--) shift ; break ;;
*) echo "Unknown option '$1', did you forget '--'?" >/dev/stderr
exit 3
;;
esac
shift
done
# Starting the dpl-eventgen simulation
o2-sim-dpl-eventgen -b --generator external --nEvents $NEV --configFile $ini