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