4 from TrigConfigSvc.TrigConfigSvcCfg
import getHLTPrescalesSetFileName
5 from AthenaCommon.Logging
import logging
6 __log = logging.getLogger( __name__ )
9 """ Generates JSON given the ChainProps and sequences
13 "filetype":
"hltprescale",
14 "name": flags.Trigger.triggerMenuSetup,
18 for chain
in sorted(chainDicts, key=
lambda d: d[
'chainName']):
21 if (
int(chain[
"prescale"]) <= 0):
25 chainName = chain[
"chainName"]
26 prescaleDict[
"prescales"][chainName] = {
27 "hash": chain[
"chainNameHash"],
28 "prescale": chain[
"prescale"],
29 "enabled": chainEnabled
32 if "express" in chain[
"stream"]:
33 prescaleDict[
"prescales"][chainName][
'prescale_express'] = chain[
"prescale"]
34 prescaleDict[
"prescales"][chainName][
'enabled_express'] = chainEnabled
38 __log.info(
"Writing HLT Prescale JSON to %s", fileName )
39 with open( fileName,
'w' )
as fp:
40 json.dump( prescaleDict, fp, indent=4, sort_keys=
False )