4 def GCP(config, validationDir):
10 if "doUnitTest" in config[
"validations"][
"GCP"].
keys():
11 doUnitTest = config[
"validations"][
"GCP"][
"doUnitTest"]
14 for comparison
in config[
"validations"][
"GCP"][
"compare"]:
15 for ali_pair
in config[
"validations"][
"GCP"][
"compare"][comparison]:
16 ref_name = copy.deepcopy(config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair][
"reference"])
17 comp_name = copy.deepcopy(config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair][
"compared"])
23 if "IOVlist" in config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair]: IOV_list = copy.deepcopy(config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair][
"IOVlist"])
25 for idx,IOV
in enumerate(IOV_list):
26 if ref_name == comp_name:
27 IOV_pair =
str(IOV)+
'_vs_'+
str(IOV_list[0])
28 IOV_ali_r = ref_name+
'_'+
str(IOV_list[0])
29 IOV_ali_c = comp_name+
'_'+
str(IOV)
31 IOV_pair =
str(IOV)+
'_vs_'+
str(IOV)
32 IOV_ali_r = ref_name+
'_'+
str(IOV)
33 IOV_ali_c = comp_name+
'_'+
str(IOV)
34 if IOV_pair
not in IOVpair_list: IOVpair_list.append(IOV_pair)
35 if IOV_ali_r
not in IOVali_list: IOVali_list.append(IOV_ali_r)
36 if IOV_ali_c
not in IOVali_list: IOVali_list.append(IOV_ali_c)
40 if "IOVpairs" in config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair]: pair_list = copy.deepcopy(config[
"validations"][
"GCP"][
"compare"][comparison][ali_pair][
"IOVpairs"])
41 for IOV_p
in pair_list:
42 IOV_pair =
str(IOV_p[0])+
'_vs_'+
str(IOV_p[1])
43 IOV_ali_r = ref_name+
'_'+
str(IOV_p[1])
44 IOV_ali_c = comp_name+
'_'+
str(IOV_p[0])
45 if IOV_pair
not in IOVpair_list: IOVpair_list.append(IOV_pair)
46 if IOV_ali_r
not in IOVali_list: IOVali_list.append(IOV_ali_r)
47 if IOV_ali_c
not in IOVali_list: IOVali_list.append(IOV_ali_c)
50 for IOV_ali
in IOVali_list:
51 ali = IOV_ali.split(
'_')[0]
52 IOV =
int(IOV_ali.split(
'_')[1])
53 workDir =
"{}/GCP/{}/{}/{}".
format(validationDir, comparison,
'Ntuples', IOV_ali)
57 local[
"output"] =
"{}/{}/{}/{}/{}".
format(config[
"LFS"], config[
"name"], comparison,
'Ntuples', IOV_ali)
58 local[
"alignments"] = copy.deepcopy(config[
"alignments"][ali])
59 local[
"validation"] = {}
60 local[
"validation"][
'GCP'] = copy.deepcopy(config[
"validations"][
"GCP"][comparison])
61 local[
"validation"][
'GCP'][
'doUnitTest'] = doUnitTest
62 local[
"validation"][
'IOV'] = IOV
66 "name":
"GCP_{}_Ntuple_{}".
format(comparison, IOV_ali),
69 "cms-config":
"{}/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/GCP_Ntuples_cfg.py".
format(os.environ[
"CMSSW_BASE"]),
73 "flavour":
"espresso",
79 if j[
"name"] == job[
"name"]:
83 if not already_there: jobs.append(job)
86 for IOV_pair
in IOVpair_list:
87 ref_IOV =
int(IOV_pair.split(
'_vs_')[1])
88 comp_IOV =
int(IOV_pair.split(
'_vs_')[0])
92 local[
"output"] =
"{}/{}/{}/{}/{}".
format(config[
"LFS"], config[
"name"], comparison, ali_pair, IOV_pair)
93 local[
"alignments"] = {}
94 local[
"alignments"][
"ref"] = copy.deepcopy(config[
"alignments"][ref_name])
95 local[
"alignments"][
"comp"] = copy.deepcopy(config[
"alignments"][comp_name])
96 local[
"validation"] = {}
97 local[
"validation"][
'GCP'] = copy.deepcopy(config[
"validations"][
"GCP"][comparison])
98 local[
"validation"][
'GCP'][
'doUnitTest'] = doUnitTest
99 local[
"validation"][
"IOVref"] = ref_IOV
100 local[
"validation"][
"ALIref"] = ref_name
101 local[
"validation"][
"IOVcomp"] = comp_IOV
102 local[
"validation"][
"ALIcomp"] = comp_name
107 if not comparison
in j[
'name']:
continue 108 if not 'Ntuple' in j[
'name']:
continue 109 if ref_name
in j[
'name']
and str(ref_IOV)
in j[
'name']:
110 parents.append(j[
'name'])
111 local[
"input_ref"] = j[
'config'][
'output']
112 if comp_name
in j[
'name']
and str(comp_IOV)
in j[
'name']:
113 parents.append(j[
'name'])
114 local[
"input_comp"] = j[
'config'][
'output']
117 for step
in [
'GCPtree',
'GCPcpp',
'GCPpython']:
118 workDir =
"{}/GCP/{}/{}/{}/{}".
format(validationDir, comparison, ali_pair, IOV_pair, step)
120 "name":
"GCP_{}_{}_{}_{}".
format(comparison, ali_pair, IOV_pair, step),
122 "run-mode":
"Condor",
124 "flavour":
"espresso",
126 if step ==
'GCPtree':
127 job[
'exe'] =
'cmsRun' 128 job[
'cms-config'] =
"{}/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/GCP_tree_cfg.py".
format(os.environ[
"CMSSW_BASE"])
129 job[
'dependencies'] = parents
130 elif step ==
'GCPcpp':
131 job[
'flavour'] =
'microcentury' 133 job[
'dependencies'] = parents + [
"GCP_{}_{}_{}_{}".
format(comparison, ali_pair, IOV_pair,
'GCPtree')]
135 job[
'exe'] =
'GCPpyPlots.py' 136 job[
'dependencies'] = parents + [
"GCP_{}_{}_{}_{}".
format(comparison, ali_pair, IOV_pair,
'GCPtree')]
141
int GCP(int argc, char *argv[])