ATLAS Offline Software
Loading...
Searching...
No Matches
HLTCFTools.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from AthenaCommon.Logging import logging
4log = logging.getLogger( __name__ )
5
6from AthenaConfiguration.ComponentFactory import CompFactory
7RoRSeqFilter = CompFactory.RoRSeqFilter
8PassFilter = CompFactory.PassFilter
9
10
11class NoHypoToolCreated(Exception):
12 """Exception thrown by HypoTool generators if no HypoTool is needed""" # see ATR-23920
13
14
15def algColor(alg):
16 """ Set given color to Alg type"""
17 if isComboHypoAlg(alg):
18 return "darkorange"
19 if isHypoBase(alg):
20 return "darkorchid1"
21 if isInputMakerBase(alg):
22 return "cyan3"
23 if isFilterAlg(alg):
24 return "chartreuse3"
25 if isPassFilterAlg(alg):
26 return "darkgreen"
27 return "cadetblue1"
28
29
30
31def isHypoBase(alg):
32 if 'HypoInputDecisions' in alg.__class__.__dict__:
33 return True
34 prop = alg.__class__.__dict__.get('_properties')
35 if type(prop) is dict:
36 return ('HypoInputDecisions' in prop)
37 else:
38 return False
39
41 return ('InputMakerInputDecisions' in alg.__class__.__dict__)
42
43def isFilterAlg(alg):
44 return isinstance(alg, RoRSeqFilter)
45
47 return isinstance(alg, PassFilter)
48
50 return ('MultiplicitiesMap' in alg.__class__.__dict__)
51
52def isHypoAlg(alg):
53 return isHypoBase(alg) and not isComboHypoAlg(alg)
54
algColor(alg)
Definition HLTCFTools.py:15
isInputMakerBase(alg)
Definition HLTCFTools.py:40
isPassFilterAlg(alg)
Definition HLTCFTools.py:46
isHypoBase(alg)
Definition HLTCFTools.py:31
isComboHypoAlg(alg)
Definition HLTCFTools.py:49
isFilterAlg(alg)
Definition HLTCFTools.py:43
isHypoAlg(alg)
Definition HLTCFTools.py:52