Skip to content

Commit 101de15

Browse files
committed
Fix formatting - that checker is ridiculously pedantic about things and makes life so much more difficult than it needs to be for very little gain
1 parent c57c89f commit 101de15

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

run/SimExamples/HepMC/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Please refer to the documentation of these for more on how to make
2222
event files in the HepMC format.
2323

2424
To make a simulation reading from the file `events.hepmc`, do
25+
2526
o2-sim -g hepmc --configKeyValues "HepMC.fileName=events.hepmc" ...
26-
27+
2728
See also [`read.sh`](read.sh).
2829

2930
## Reading HepMC events from child process
@@ -35,7 +36,7 @@ EG by
3536

3637
o2-sim -g hepmc --configKeyValues "HepMC.progCmd=eg"
3738

38-
See also [`child.sh`](child.sh).
39+
See also [`child.sh`](child.sh).
3940

4041
There are some requirements on the program `eg`:
4142

@@ -52,7 +53,7 @@ We can filter that out via a shell script ([`crmc.sh`](crmc.sh)) like
5253

5354
#!/bin/sh
5455
crmc $@ -o hepmc3 -f /dev/stdout | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
55-
56+
5657
The `sed` command selects lines that begin with `HepMC::`, or one
5758
of single characters `E` (event), `A` (attribute), `U` (units), `W`
5859
(weight), `V` (vertex), or `P` (particle) followed by a space. This
@@ -65,8 +66,8 @@ the CRMC suite. For example, if we want to simulate p-Pb collisions
6566
using DpmJET, we can do
6667

6768
o2-sim -g hepmc --configKeyValues "HepMC.progCmd=crmc.sh -m 12 -i2212 -I 1002080820"
68-
69-
69+
70+
7071
### Implementation details
7172

7273
Internally `GeneratorHepMC`

run/SimExamples/HepMC/read.sh

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@ out=
77

88
usage()
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

2626
while 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
3939
done
@@ -43,8 +43,6 @@ if test "x$out" = "x" ; then
4343
fi
4444
out=`echo "$out" | tr ' ' '_'`
4545

46-
export VMCWORKDIR=${O2_ROOT}/share
46+
export VMCWORKDIR=${O2_ROOT}/share
4747
o2-sim -g hepmc --configKeyValues "HepMC.fileName=$inp" \
4848
--outPrefix "$out" --seed $seed --nEvents $nev $@
49-
50-

0 commit comments

Comments
 (0)