ATLAS Offline Software
Loading...
Searching...
No Matches
menu_config_tests.PartialEventBuildingChecks Class Reference
Inheritance diagram for menu_config_tests.PartialEventBuildingChecks:
Collaboration diagram for menu_config_tests.PartialEventBuildingChecks:

Public Member Functions

 __init__ (self)
 run (self, config)

Public Attributes

 description = description
list failures = []

Detailed Description

Definition at line 210 of file menu_config_tests.py.

Constructor & Destructor Documentation

◆ __init__()

menu_config_tests.PartialEventBuildingChecks.__init__ ( self)

Definition at line 211 of file menu_config_tests.py.

211 def __init__(self):
212 super(PartialEventBuildingChecks, self).__init__(
213 description='Config consistency of Partial Event Building')
214

Member Function Documentation

◆ run()

menu_config_tests.PartialEventBuildingChecks.run ( self,
config )

Reimplemented from menu_config_tests.MenuVerification.

Definition at line 215 of file menu_config_tests.py.

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 # Check streaming configuration
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 # Not a PEB chain, skip further PEB-specific checks
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[])

Member Data Documentation

◆ description

menu_config_tests.MenuVerification.description = description
inherited

Definition at line 29 of file menu_config_tests.py.

◆ failures

list menu_config_tests.MenuVerification.failures = []
inherited

Definition at line 30 of file menu_config_tests.py.


The documentation for this class was generated from the following file: