Skip to content

Commit e1db4b0

Browse files
committed
Fix formatting
1 parent 0434a6e commit e1db4b0

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

run/SimExamples/HepMC/README.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/doxy -->
44

55
Here are pointers on how to use `GeneratorHepMC` selected by the
6-
option `-g hepmc` for `o2-sim`.
6+
option `-g hepmc` for `o2-sim`.
77

88
## Reading HepMC files
99

@@ -19,31 +19,32 @@ Examples of such programs are
1919
- ... and many others
2020

2121
Please refer to the documentation of these for more on how to make
22-
event files in the HepMC format.
22+
event files in the HepMC format.
2323

2424
To make a simulation reading from the file `events.hepmc`, do
2525
o2-sim -g hepmc --configKeyValues "HepMC.fileName=events.hepmc" ...
2626

27-
See also [`read.sh`](read.sh)
27+
See also [`read.sh`](read.sh).
2828

2929
## Reading HepMC events from child process
3030
`GeneratorHepMC` can not only read HepMC events from a file, but can
3131
also spawn an child EG to produce events. Suppose we have a program
3232
named `eg` which is some EG that writes HepMC event records to the
3333
standard output. Then we can execute a simulation using this external
3434
EG by
35-
o2-sim -g hepmc --configKeyValues "HepMC.progCmd=eg"
3635

37-
See also [`child.sh`](child.sh)
36+
o2-sim -g hepmc --configKeyValues "HepMC.progCmd=eg"
3837

39-
There are some requirements on the program `eg`:
38+
See also [`child.sh`](child.sh).
39+
40+
There are some requirements on the program `eg`:
4041

4142
- It _must_ write the HepMC event structures to standard output
42-
(`/dev/stdout`).
43+
(`/dev/stdout`).
4344
- It may _not_ write other information to standard output.
4445
- It _must_ accept the option `-n n-events` to set the number of
45-
events to produce to `n-events`.
46-
46+
events to produce to `n-events`.
47+
4748
If a program does not adhere to these requirements, it will often be
4849
simple enough to make a small wrapper script that enforce this. For
4950
example, `crmc` will write a lot of information to standard output.
@@ -56,7 +57,7 @@ The `sed` command selects lines that begin with `HepMC::`, or one
5657
of single characters `E` (event), `A` (attribute), `U` (units), `W`
5758
(weight), `V` (vertex), or `P` (particle) followed by a space. This
5859
should in most cases be enough to filter out extra stuff written on
59-
standard output.
60+
standard output.
6061

6162
The script above also passes any additional command line options on to
6263
`crmc` via `$@`. We can utilise this with `o2-sim` to set options to
@@ -68,15 +69,15 @@ using DpmJET, we can do
6869

6970
### Implementation details
7071

71-
Internally `GeneratorHepMC`
72+
Internally `GeneratorHepMC`
7273

7374
1. creates a unique temporary file name in the working directory,
7475
2. then creates a FIFO (or named pipe, see
7576
[Wikipedia](https://en.wikipedia.org/wiki/Named_pipe)),
76-
3. builds a command line, e.g.,
77+
3. builds a command line, e.g.,
78+
79+
eg options > fifo-name &
7780

78-
eg options > fifo-name &
79-
8081
4. and executes that command line
8182

8283
## The future
@@ -89,48 +90,49 @@ particular
8990
- HepMC event structures can be read from any file format supported by
9091
HepMC it self (see
9192
[here](http://hepmc.web.cern.ch/hepmc/group__IO.html) and
92-
[here](http://hepmc.web.cern.ch/hepmc/group__factory.html).
93-
94-
- New options that can be specified in `--configKeyValues`
93+
[here](http://hepmc.web.cern.ch/hepmc/group__factory.html).
94+
95+
- New options that can be specified in `--configKeyValues`
9596

9697
- `HepMC.eventsToSkip=number` a number events to skip at the
97-
beginning of each file read.
98-
98+
beginning of each file read.
99+
99100
- `FileOrCmd.fileNames=list` a comma separated list of HepMC files
100-
to read
101+
to read.
102+
101103
- `FileOrCmd.cmd=command line` a command line to execute as a
102104
background child process. If this is set (not the empty string),
103-
then `FileOrCmd.fileNames` is ignored.
104-
105+
then `FileOrCmd.fileNames` is ignored.
106+
105107
- A number of keys that specifies the command line option switch
106108
that the child program accepts for certain things. If any of
107109
these are set to the empty string, then that switch and
108-
corresponding option value is not passed to the child program.
109-
110+
corresponding option value is not passed to the child program.
111+
110112
- `FileOrCmd.outputSwitch=switch` (default `>`) to specify output
111113
file. The default of `>` assumes that the program write HepMC
112-
events, and _only_ those, to standard output.
113-
114+
events, and _only_ those, to standard output.
115+
114116
- `FileOrCmd.seedSwitch=switch` (default `-s`) to specify the
115117
random number generator seed. The value passed is selected by
116-
the `o2-sim` option `--seed`
117-
118+
the `o2-sim` option `--seed`
119+
118120
- `FileOrCmd.bMaxSwitch=switch` (default `-b`) to specify the
119121
upper limit on the impact parameters sampled. The value passed
120-
is selected by the `o2-sim` option `--bMax`
121-
122+
is selected by the `o2-sim` option `--bMax`
123+
122124
- `FileOrCmd.nEventsSwitch=switch` (default `-n`) to specify the
123125
number of events to generate. The value passed is selected by
124126
the `o2-sim` option `--nEvents` or (`-n`)
125-
127+
126128
- `FileOrCmd.backgroundSwitch=switch` (default `&`) to specify how
127129
the program is put in the background. Typically this should be
128130
`&`, but a program may itself fork to the background.
129131

130132
- Some options are no longer available
131133
- `HepMC.fileName` - use `FileOrCmd.fileNames`
132-
- `HepMC.progCmd` - use `FileOrCmd.cmd`
133-
134+
- `HepMC.progCmd` - use `FileOrCmd.cmd`
135+
134136
The command line build will now be
135137

136138
> _commandLine_ _nEventsSwitch_ _nEvents_ _seedSwitch_ _seed_

0 commit comments

Comments
 (0)