Skip to content

Commit 79c368d

Browse files
authored
Merge f0b1ad6 into sapling-pr-archive-ehellbar
2 parents 1a10610 + f0b1ad6 commit 79c368d

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

UTILS/rawTF2raw/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
The script `generate_rawtf_indices.sh` provides functions to extract a list of consecutive TFs form a list of `*rawtf*.tf` files and create the corresponding `*.raw` files, e.g. for REPLAY datasets at P2.
2+
3+
Input parameters for sourcing the script:
4+
- param1: list with input `*rawtf*.tf` files
5+
- param2: directory to store output `*.raw` files
6+
- param3: number of TFs to store as `*.raw` files
7+
- param4: tfCounter id of first TF to process, e.g. at least 3500 to skip ITS ROF rate ramp up
8+
- param5: number of input Blocks to be expected per TF to select only TFs with all inputs / detectors present
9+
- if number of inputs is irrelevant, it can be set to 0 to be ignored
10+
11+
Available functions by sourcing the script:
12+
- `check_tfs_per_file`
13+
- print the average number of TFs per file from a small subset of rawtf files from the input file list
14+
- `sort_tfs`
15+
- sort the TFs from the input file list in continuous order and save the corresponding timeslice ids in the order they appear in the input file list
16+
- if nBlocks (parameter 5) is not 0, then there is an additional check on the number of requested inputs defined by nBlocks
17+
- outputs:
18+
- tf-reader_*.log: full log output from o2-raw-tf-reader-workflow which is used to grep for the timeslice and tfCounter ids
19+
- tfids_*.txt: list with timeslice and tfCounter ids, sorted by tfCounter
20+
- timeslices_*.txt: sorted list of \$nTFs timeslice indices to be used for raw data creation
21+
- `create_raw_files`
22+
- use sorted list of timeslice ids created with sort_tfs as input to create *.raw files for those timeslices
23+
- the final command (for reference) and the full log output is written to \$outputDir.log
24+
25+
Example usage:
26+
```
27+
# source functions and set input / output parameters
28+
# in this case: process 125 TFs, start at tfCounter id 3500, check `*rawtf*.tf` files for number of inputs and only use TFs with (in this case) 14 inputs to ensure all detectors from this run are present
29+
source $O2DPG_ROOT/UTILS/rawTF2raw/generate_rawtf_indices.sh rawtflist_LHC25ab_563041.txt 2025-05-19-pp-750khz-replay-LHC25ab-563041 125 3500 14
30+
31+
# create input list of timeslice IDs to be processed for `*.raw` file creation (`timeslices_*.txt`)
32+
# timeslice IDs from this list correspond to \$nTFs consecutive tfCounter ids
33+
# intermediate outputs from o2-raw-tf-reader-workflow and the sorted list of all tfCounter ids will also be stored (`reader_*.log` and `tfids_*.txt`)
34+
sort_tfs
35+
36+
# create `*.raw` files for timeslices in `timeslices_*.txt` created in the previous step
37+
create_raw_files
38+
```
39+
40+

0 commit comments

Comments
 (0)