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(ThrCondition, self).__init__( logicType = LogicType.THRESHOLD,
11 content = { "threshold" : threshold,
12 "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.content["threshold"]
22
23 def multiplicity(self):
24 return self.content["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):
35 super(InternalTrigger, self).__init__( logicType = LogicType.INTERNAL, content = name )
36
37 def __str__(self):
38 return self.name()
39
40 def name(self):
41 return str(self.content)
42
43 def thresholdNames(self, include_bgrp=False):
44 if include_bgrp:
45 return [ self.name() ]
46 else:
47 return []
48
thresholdNames(self, include_bgrp=False)
thresholdNames(self, include_bgrp=False)
__init__(self, threshold, multiplicity=1)