ATLAS Offline Software
Loading...
Searching...
No Matches
CTPCondition.py
Go to the documentation of this file.
1# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2
3from AthenaCommon.Logging import logging
4log = logging.getLogger(__name__)
5
6from .Logic import Logic, LogicType
7
9 def __init__(self, threshold, multiplicity=1):
10 super().__init__( logicType = LogicType.THRESHOLD)
11 self._threshold = threshold
12 self._multiplicity = multiplicity
13
14 def x(self, multiplicity):
15 return ThrCondition(self.threshold(), multiplicity) # provide a copy
16
17 def __str__(self):
18 return str(self.threshold()) + '[x' + str(self.multiplicity())+']'
19
20 def threshold(self):
21 return self._threshold
22
23 def multiplicity(self):
24 return self._multiplicity
25
26 def name(self):
27 return "%s_x%i" % (self.threshold().name, self.multiplicity())
28
29 def thresholdNames(self, include_bgrp=False):
30 return [ self.threshold().name ]
31
32
34 def __init__(self, name: str):
35 super().__init__( logicType = LogicType.INTERNAL )
36 self._name: str = name
37
38 def __str__(self):
39 return self.name()
40
41 def name(self):
42 return self._name
43
44 def thresholdNames(self, include_bgrp=False):
45 if include_bgrp:
46 return [ self.name() ]
47 else:
48 return []
49
thresholdNames(self, include_bgrp=False)
thresholdNames(self, include_bgrp=False)
__init__(self, threshold, multiplicity=1)