68 ignore: Optional[Container[str]]) -> IOVSet:
69 """
70 Returns a list of IoVs for a given query in the normal COOL order
71 (sorted by channelID, then by since)
72 """
73
74 if since is None: since = 0
75 if until is None: until = 2**63-1
76 since, until = RunLumi(since), RunLumi(until)
77
78 result = defaultdict(IOVSet)
79
80 primary_by_channel = primary_iovs.by_channel
81
82
83 for primary_channel, primary_iovs in primary_by_channel.items():
84 if primary_channel in primary_output_channels:
85 if ignore is not None and primary_channel in ignore:
86 continue
87 result[primary_channel] = primary_iovs
88
89 args = primary_by_channel, evaluation_order, since, until, ignore
90
91
92 vfgen = [] if not evaluation_order else generate_virtual_defects(*args)
93
94 for since, until, virtual_iovs in vfgen:
95 if bad_iov(since, until):
96 continue
97
98 for output_name in virtual_output_channels:
99
100
101 iov = virtual_iovs.get(output_name)
102 if iov and iov.present:
103 result[output_name].
add(since, until, *iov[2:])
104
105
106
107 result_list = IOVSet()
108 for _, iovs in sorted(result.items()):
109 result_list.extend(iovs.solidify(DEFECT_IOV))
110
111 return result_list
bool add(const std::string &hname, TKey *tobj)