Skip to content

Commit 8ae5aab

Browse files
committed
feat: control output file name for charge analysis
1 parent 3b38467 commit 8ae5aab

2 files changed

Lines changed: 20 additions & 6 deletions

File tree

qa-physics/charge_analysis/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
From Bhawani Singh
44

5+
`./analyze.py` Produces PNG files comparing the DAQ-gated FC charge determined from
6+
- the `RUN::scaler` bank directly
7+
- the livetime and ungated charge, by multiplication
8+
9+
### Example
10+
11+
Suppose we have reheated (`qtl reheat`) a skim file on `/cache` and
12+
stored it at `/volatile/reheat/`. To compare results:
13+
514
```bash
6-
./analyze HIPO_FILE
15+
./analyze.py /cache/...../skim.hipo before_reheat
16+
./analyze.py /volatile/reheat/skim.hipo after_reheat
17+
ls -t *.png
718
```
8-
Produces PNG files comparing the DAQ-gated FC charge determined from
9-
- directly from the `RUN::scaler` bank
10-
- from the livetime and ungated charge, by multiplication

qa-physics/charge_analysis/analyze.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@
2222

2323
def main():
2424

25-
if len(sys.argv) != 2:
26-
print(f'USAGE: {sys.argv[0]} [HIPO_FILE]')
25+
if len(sys.argv) != 3:
26+
print(f'''
27+
USAGE: {sys.argv[0]} [INPUT_HIPO_FILE] [OUTPUT_FILE_SUFFIX]
28+
INPUT_HIPO_FILE input HIPO file
29+
OUTPUT_FILE_SUFFIX append this string to the output
30+
file name; useful if you are comparing
31+
output files before and after reheating
32+
''')
2733
exit(2)
2834
hipo_file = sys.argv[1]
2935

0 commit comments

Comments
 (0)