10Validation of PXD gain calibration.
14from prompt
import ValidationSettings
21settings = ValidationSettings(name=
'PXD gain calibration',
23 download_files=[
'PXDPerformanceVariablesCollectorValidation.root'],
27def run_validation(job_path, input_data_path, requested_iov, expert_config):
32 txt_files = glob(f
"{job_path}/*PXD*Gain*/outputdb/database.txt")
33 cmds = [
"b2pxd-db-check",
"--only-hist",
"--maps",
35 for txt_file
in txt_files:
36 iov_entries = parse_testing_payloads_file(txt_file)
37 exp = iov_entries[0].firstRun[
"exp"]
38 run = iov_entries[0].firstRun[
"run"]
39 cmds_add = [
"--tag", txt_file,
40 "--exp", f
"{exp}",
"--runs", f
"{run}-9999",
41 "-o", f
"conditions_gain_e{exp}_r{run}.root"]
42 subprocess.run(cmds + cmds_add, check=
True)
44 root_files = glob(f
"{job_path}/*PXD*Gain*/*/algorithm_output/PXDPerformanceVariablesCollectorValidation.root")
45 for root_file
in root_files:
46 cmds = [
"b2pxd-val",
"-i", root_file]
47 subprocess.run(cmds, check=
True)
50if __name__ ==
"__main__":