31 "filetype":
"hltmonitoringsummary",
37 for chain
in chainDicts:
38 chain_name = chain[
'chainName']
39 __log.debug(
"[HLTMonitoring::generateMonitoringJSON] Processing Chain %s ...", chain_name)
42 if 'express' in chain[
'stream']:
43 if len(chain[
'monGroups']) == 0:
44 __log.warning(
"[HLTMonitoring::generateMonitoringJSON]Chain %s is in the express stream and doesn't have any monGroup", chain_name)
47 if len(chain[
'monGroups']) == 0:
50 __log.debug(
"[HLTMonitoring::generateMonitoringJSON] Chain %s has monitoring groups!", chain_name)
53 for entry
in chain[
'monGroups']:
54 monSignature = entry.split(
':')[0]
55 monGroup = entry.split(
':')[1]
57 if monSignature
not in summaryDict[
'signatures']:
58 summaryDict[
'signatures'][monSignature] = {chain_name: [monGroup]}
62 if chain_name
not in summaryDict[
'signatures'][monSignature]:
63 summaryDict[
'signatures'][monSignature].
update({chain_name: [monGroup]})
65 summaryDict[
'signatures'][monSignature][chain_name].
append(monGroup)
68 __log.info(
"Writing Summary of HLT Monitoring JSON to %s", fileName)
69 with open(fileName,
'w')
as outfile:
70 json.dump(summaryDict, outfile, indent = 4, sort_keys=
False )