215 def run(self, config):
216 from TriggerMenuMT.HLT.Menu import EventBuildingInfo
217 eb_identifiers = EventBuildingInfo.getAllEventBuildingIdentifiers()
218
219 for chain_name, chain_config in config['chains'].items():
220 peb_identifiers = [idf for idf in eb_identifiers if '_'+idf+'_' in chain_name]
221 peb_writers = [seq for seq in chain_config['sequencers'] if 'PEBInfoWriter' in seq]
222
223 is_peb_chain = (len(peb_identifiers) > 0 or len(peb_writers) > 0)
224
225
226 for stream_name in chain_config['streams']:
227 if stream_name not in config['streams']:
228 self.failures.append(
229 'Stream {:s} for chain {:s} is not defined in streaming configuration'.format(
230 stream_name, chain_name))
231
232 is_feb_stream = config['streams'][stream_name]['forceFullEventBuilding']
233
234 if is_peb_chain and is_feb_stream:
235 self.failures.append(
236 'PEB chain {:s} streamed to a full-event-building stream {:s} '
237 '(forceFullEventBuilding=True)'.format(
238 chain_name, stream_name))
239
240 elif not is_peb_chain and not is_feb_stream:
241 self.failures.append(
242 'Full-event-building chain {:s} streamed to the stream {:s} which allows partial '
243 'event building (forceFullEventBuilding=False)'.format(
244 chain_name, stream_name))
245
246 if not is_peb_chain:
247
248 continue
249
250 if len(peb_identifiers) != 1:
251 self.failures.append(
252 '{:s} has {:d} event building identifiers'.format(chain_name, len(peb_identifiers)))
253
254 if len(peb_writers) != 1:
255 self.failures.append(
256 '{:s} has {:d} PEBInfoWriter sequences'.format(chain_name, len(peb_writers)))
257
258 if peb_identifiers and peb_writers and not peb_writers[0].endswith(peb_identifiers[0]):
259 self.failures.append(
260 '{:s} PEB sequence name {:s} doesn\'t end with PEB identifier {:s}'.format(
261 chain_name, peb_writers[0], peb_identifiers[0]))
262
263
264
int run(int argc, char *argv[])