ATLAS Offline Software
TrigNavToolsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 
6 
7 def _actions(mode):
8  options = {
9  "drop": ["Drop"],
10  "slimming": [
11  "DropFeatures",
12  "Squeeze",
13  "Reload",
14  "SyncThinning",
15  "DropChains",
16  "Save",
17  "Restore",
18  ],
19  "trigger": [
20  "DropFeatures",
21  "Reload",
22  "SyncThinning",
23  "DropChains",
24  "Save",
25  "Restore",
26  ],
27  "cleanup": ["DropFeatures", "Reload", "SyncThinning", "Save"],
28  "cleanup_noreload": ["DropFeatures", "SyncThinning", "Save"],
29  }
30  return options[mode]
31 
32 
33 def TrigNavigationThinningSvcCfg(flags, thinningConfig):
34  assert "name" in thinningConfig, "name of the configuration is missing"
35  assert "mode" in thinningConfig, "mode of slimming has to be configured"
36 
37  acc = ComponentAccumulator()
38  svc = CompFactory.TrigNavigationThinningSvc(
39  thinningConfig["name"] + "ThinSvc", Actions=_actions(thinningConfig["mode"])
40  )
41  if "chains" in thinningConfig:
42  svc.ChainsRegex = thinningConfig["chains"]
43  if "features" in thinningConfig:
44  svc.FeatureInclusionList = thinningConfig["features"]
45  if "Print" in svc.Actions:
46  from AthenaCommon.Constants import DEBUG
47 
48  svc.OutputLevel = DEBUG
49  acc.addService(svc, primary = True)
50  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrigNavToolsConfig._actions
def _actions(mode)
Definition: TrigNavToolsConfig.py:7
python.TrigNavToolsConfig.TrigNavigationThinningSvcCfg
def TrigNavigationThinningSvcCfg(flags, thinningConfig)
Definition: TrigNavToolsConfig.py:33
Constants
some useful constants -------------------------------------------------—