ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArROD
python
LArFebErrorSummaryMakerConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
from
AthenaConfiguration.ComponentFactory
import
CompFactory
3
from
AthenaConfiguration.Enums
import
ProductionStep
4
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadFebCfg
5
from
AthenaCommon.Logging
import
logging
6
from
OutputStreamAthenaPool.OutputStreamConfig
import
addToESD
7
8
def
LArFebErrorSummaryMakerCfg
(flags):
9
10
log = logging.getLogger(
'LArFebErrorSummaryMakerConfig'
)
11
projectName=flags.Input.ProjectName
12
13
bCheckAllFEB=
True
14
streamName=flags.Input.ProcessingTags
15
if
len(streamName) > 0
and
len(streamName[0])>4
and
streamName[0].endswith(
"PEB"
):
16
log.info(
"StreamName %s suggests partial event building. Do not check for FEB completeness"
,str(streamName))
17
bCheckAllFEB=
False
18
19
20
if
projectName ==
"data_test"
:
21
from
datetime
import
date
22
yearNumber=date.today().year-2000
23
log.info(
"Found project name data_test, assume year number to be %d"
,yearNumber)
24
else
:
25
try
:
26
yearNumber=int(projectName[4:6])
27
except
ValueError:
28
from
datetime
import
date
29
yearNumber=date.today().year-2000
30
log.warning(
"Failed to extract year from project tag "
+ projectName+
". Guessing %d"
,yearNumber)
31
32
if
yearNumber > 20:
33
lMaskFebScacStatus = [0x38680000,0x38720000]
34
lMaskFebEvtId = [0x38680000]
35
else
:
36
lMaskFebScacStatus = [0x38080000]
37
lMaskFebEvtId = [0x38080000]
38
# needed only if it is not in DB.
39
#lMaskFebZeroSample = [0x39618000,0x39930000,0x3b1b0000,0x38db0000,0x38f60000,0x39ae8000,0x3bb90000]
40
41
acc = LArBadFebCfg(flags)
42
43
minErrFeb=1
44
# In online or express processing, EventInfo::LArError is triggered if >=4 FEB with data corrupted
45
if
flags.Common.isOnline
or
flags.Common.doExpressProcessing:
46
minErrFeb=4
47
48
acc.addEventAlgo(CompFactory.LArFebErrorSummaryMaker(
"LArFebErrorSummaryMaker"
,CheckAllFEB=bCheckAllFEB,
49
WriteKey=
"StoreGateSvc+LArFebErrorSummary"
,
50
EventInfoKey=f
"{flags.Overlay.BkgPrefix}EventInfo"
if
flags.Common.ProductionStep
is
ProductionStep.MinbiasPreprocessing
else
"EventInfo"
,
51
MaskFebScacStatus = lMaskFebScacStatus, MaskFebEvtId = lMaskFebEvtId,
52
minFebInError=minErrFeb
53
#MaskFebZeroSample = lMaskFebZeroSample,
54
)
55
)
56
57
acc.merge(addToESD(flags,[
"LArFebErrorSummary#LArFebErrorSummary"
,]))
58
59
return
acc
60
61
62
if
__name__==
"__main__"
:
63
64
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
65
from
AthenaCommon.Logging
import
log
66
from
AthenaCommon.Constants
import
DEBUG
67
log.setLevel(DEBUG)
68
69
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
70
flags = initConfigFlags()
71
flags.Input.Files = defaultTestFiles.RAW_RUN2
72
flags.lock()
73
74
75
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
76
from
LArByteStream.LArRawDataReadingConfig
import
LArRawDataReadingCfg
77
78
acc=MainServicesCfg(flags)
79
acc.merge(LArRawDataReadingCfg(flags))
80
acc.merge(
LArFebErrorSummaryMakerCfg
(flags))
81
82
acc.run(3)
Constants
python.LArFebErrorSummaryMakerConfig.LArFebErrorSummaryMakerCfg
LArFebErrorSummaryMakerCfg(flags)
Definition
LArFebErrorSummaryMakerConfig.py:8
Generated on
for ATLAS Offline Software by
1.17.0