4 def SplitV(config, validationDir):
13 if not SplitVType
in config[
"validations"][
"SplitV"]:
14 raise Exception(
"No 'single' key word in config for SplitV")
16 for singleName
in config[
"validations"][
"SplitV"][SplitVType]:
17 for IOV
in config[
"validations"][
"SplitV"][SplitVType][singleName][
"IOV"]:
22 for alignment
in config[
"validations"][
"SplitV"][SplitVType][singleName][
"alignments"]:
24 workDir =
"{}/SplitV/{}/{}/{}/{}".
format(validationDir, SplitVType, singleName, alignment, IOV)
28 local[
"output"] =
"{}/{}/SplitV/{}/{}/{}/{}".
format(config[
"LFS"], config[
"name"], SplitVType, alignment, singleName, IOV)
29 local[
"alignment"] = copy.deepcopy(config[
"alignments"][alignment])
30 local[
"validation"] = copy.deepcopy(config[
"validations"][
"SplitV"][SplitVType][singleName])
31 local[
"validation"].pop(
"alignments")
32 local[
"validation"][
"IOV"] = IOV
33 if "dataset" in local[
"validation"]:
34 local[
"validation"][
"dataset"] = local[
"validation"][
"dataset"].
format(IOV)
35 if "goodlumi" in local[
"validation"]:
36 local[
"validation"][
"goodlumi"] = local[
"validation"][
"goodlumi"].
format(IOV)
40 "name":
"SplitV_{}_{}_{}_{}".
format(SplitVType, alignment, singleName, IOV),
43 "cms-config":
"{}/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/SplitV_cfg.py".
format(os.environ[
"CMSSW_BASE"]),
52 if "merge" in config[
"validations"][
"SplitV"]:
58 for mergeName
in config[
"validations"][
"SplitV"][SplitVType]:
61 workDir =
"{}/SplitV/{}/{}/{}".
format(validationDir, SplitVType, mergeName, IOV)
67 "name":
"SplitV_{}_{}_{}".
format(SplitVType, mergeName, IOV),
75 for alignment
in config[
"alignments"]:
77 local.setdefault(
"alignments", {})
78 if alignment
in config[
"validations"][
"SplitV"][
"single"][mergeName][
"alignments"]:
79 local[
"alignments"][alignment] = copy.deepcopy(config[
"alignments"][alignment])
80 local[
"validation"] = copy.deepcopy(config[
"validations"][
"SplitV"][SplitVType][mergeName])
81 local[
"output"] =
"{}/{}/SplitV/{}/{}/{}".
format(config[
"LFS"], config[
"name"], SplitVType, mergeName, IOV)
84 for singleJob
in jobs:
86 alignment, singleName, singleIOV = singleJob[
"name"].
split(
"_")[2:]
88 if int(singleIOV) == IOV
and singleName
in config[
"validations"][
"SplitV"][SplitVType][mergeName][
"singles"]:
89 local[
"alignments"][alignment][
"file"] = singleJob[
"config"][
"output"]
90 job[
"dependencies"].
append(singleJob[
"name"])
94 jobs.extend(mergeJobs)
def SplitV(config, validationDir)
def split(sequence, size)