ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
L1
Base
MonCounters.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
from
functools
import
total_ordering
4
5
from
AthenaCommon.Logging
import
logging
6
log = logging.getLogger(__name__)
7
8
class
MenuMonCountersCollection
(
object
):
9
10
def
__init__
(self):
11
# list of monitoring counters
12
self.
counters
= {
13
'ctpmon'
: [],
14
'ctpin'
: []
15
}
16
17
def
addCounter
(self, c):
18
if
c.montype
not
in
self.
counters
:
19
self.
counters
[c.montype] = []
20
self.
counters
[c.montype] += [c]
21
22
def
json
(self):
23
confObj = { key: {c.name: c.json()
for
c
in
clist}
for
key,clist
in
self.
counters
.items() }
24
return
confObj
25
26
27
@total_ordering
28
class
MonCounter
(
object
):
29
30
def
__init__
(self, threshold, multiplicity, montype):
31
self.
name
=
"%i%s"
% (multiplicity, threshold)
32
self.
threshold
= threshold
33
self.
multiplicity
= int(multiplicity)
34
self.
montype
= montype
35
pass
36
37
def
__lt__
(self, o):
38
if
(self.
threshold
!=o.threshold):
39
return
self.
threshold
< o.threshold
40
return
self.
multiplicity
< o.multiplicity
41
42
def
__eq__
(self, o):
43
return
self.
name
== o.name
44
45
def
json
(self):
46
confObj = {
47
"thr"
: self.
threshold
,
48
"multiplicity"
: self.
multiplicity
49
}
50
return
confObj
51
52
53
class
CtpinCounter
(
MonCounter
):
54
"""
55
These monitor the CTP Item counts
56
"""
57
def
__init__
(self, threshold, multiplicity):
58
super(CtpinCounter, self).
__init__
(threshold, multiplicity,
'ctpin'
)
59
60
class
CtpmonCounter
(
MonCounter
):
61
"""
62
These monitor the CTPInput signal counts
63
"""
64
def
__init__
(self, threshold, multiplicity):
65
super(CtpmonCounter, self).
__init__
(threshold, multiplicity,
'ctpmon'
)
66
json
nlohmann::json json
Definition
HistogramDef.cxx:9
if
if(febId1==febId2)
Definition
LArRodBlockPhysicsV0.cxx:567
python.L1.Base.MonCounters.CtpinCounter
Definition
MonCounters.py:53
python.L1.Base.MonCounters.CtpinCounter.__init__
__init__(self, threshold, multiplicity)
Definition
MonCounters.py:57
python.L1.Base.MonCounters.CtpmonCounter
Definition
MonCounters.py:60
python.L1.Base.MonCounters.CtpmonCounter.__init__
__init__(self, threshold, multiplicity)
Definition
MonCounters.py:64
python.L1.Base.MonCounters.MenuMonCountersCollection
Definition
MonCounters.py:8
python.L1.Base.MonCounters.MenuMonCountersCollection.addCounter
addCounter(self, c)
Definition
MonCounters.py:17
python.L1.Base.MonCounters.MenuMonCountersCollection.__init__
__init__(self)
Definition
MonCounters.py:10
python.L1.Base.MonCounters.MenuMonCountersCollection.counters
dict counters
Definition
MonCounters.py:12
python.L1.Base.MonCounters.MonCounter
Definition
MonCounters.py:28
python.L1.Base.MonCounters.MonCounter.name
str name
Definition
MonCounters.py:31
python.L1.Base.MonCounters.MonCounter.__lt__
__lt__(self, o)
Definition
MonCounters.py:37
python.L1.Base.MonCounters.MonCounter.threshold
threshold
Definition
MonCounters.py:32
python.L1.Base.MonCounters.MonCounter.montype
montype
Definition
MonCounters.py:34
python.L1.Base.MonCounters.MonCounter.__init__
__init__(self, threshold, multiplicity, montype)
Definition
MonCounters.py:30
python.L1.Base.MonCounters.MonCounter.__eq__
__eq__(self, o)
Definition
MonCounters.py:42
python.L1.Base.MonCounters.MonCounter.multiplicity
multiplicity
Definition
MonCounters.py:33
object
Generated on
for ATLAS Offline Software by
1.14.0