ATLAS Offline Software
LArCalorimeter
LArBadChannelTool
python
LArBadFebsConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
from
AthenaConfiguration.Enums
import
LHCPeriod
6
from
IOVDbSvc.IOVDbSvcConfig
import
addFoldersSplitOnline
7
8
LArBadFebCondAlg = CompFactory.LArBadFebCondAlg
9
10
11
def
LArKnownBadFebCfg
(configFlags, tag=None):
12
result=
ComponentAccumulator
()
13
14
if
configFlags.GeoModel.Run
is
LHCPeriod.Run1:
15
rekey=
""
16
else
:
17
rekey=
"/LAR/BadChannels/KnownBADFEBs"
18
result.merge(
addFoldersSplitOnline
(configFlags,
"LAR"
,
"/LAR/BadChannels/KnownBADFEBs"
,
19
f
"/LAR/BadChannelsOfl/KnownBADFEBs<key>{rekey}</key>"
,tag=tag,
20
className=
"AthenaAttributeList"
))
21
22
result.addCondAlgo(
LArBadFebCondAlg
(
"LArKnownBadFebAlg"
,ReadKey=rekey,WriteKey=
"LArKnownBadFEBs"
))
23
return
result
24
25
def
LArKnownMNBFebCfg
(configFlags, tag=None):
26
result=
ComponentAccumulator
()
27
28
if
configFlags.GeoModel.Run
is
LHCPeriod.Run1:
29
rekey=
""
30
else
:
31
rekey=
"/LAR/BadChannels/KnownMNBFEBs"
32
result.merge(
addFoldersSplitOnline
(configFlags,
"LAR"
,
"/LAR/BadChannels/KnownMNBFEBs"
,
33
f
"/LAR/BadChannelsOfl/KnownMNBFEBs<key>{rekey}</key>"
,tag=tag,
34
className=
"AthenaAttributeList"
))
35
36
result.addCondAlgo(
LArBadFebCondAlg
(
"LArKnownMNBFebAlg"
,ReadKey=rekey,WriteKey=
"LArKnownMNBFEBs"
))
37
return
result
38
39
40
41
if
__name__==
"__main__"
:
42
43
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
44
from
AthenaCommon.Logging
import
log
45
from
AthenaCommon.Constants
import
DEBUG
46
log.setLevel(DEBUG)
47
48
flags=
initConfigFlags
()
49
flags.Input.isMC =
False
50
flags.Input.Files = [
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data17_13TeV.00330470.physics_Main.daq.RAW._lb0310._SFO-1._0001.data"
]
51
flags.lock()
52
53
cfg=
ComponentAccumulator
()
54
55
cfg.merge(
LArKnownBadFebCfg
(flags))
56
cfg.merge(
LArKnownMNBFebCfg
(flags))
57
f=
open
(
"LArBadFebCondAlgos.pkl"
,
"wb"
)
58
cfg.store(f)
59
f.close()
python.LArBadFebsConfig.LArKnownMNBFebCfg
def LArKnownMNBFebCfg(configFlags, tag=None)
Definition:
LArBadFebsConfig.py:25
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition:
JetAnalysisCommon.py:302
Constants
some useful constants -------------------------------------------------—
python.LArBadFebsConfig.LArKnownBadFebCfg
def LArKnownBadFebCfg(configFlags, tag=None)
Definition:
LArBadFebsConfig.py:11
python.IOVDbSvcConfig.addFoldersSplitOnline
def addFoldersSplitOnline(flags, detDb, onlineFolders, offlineFolders, className=None, extensible=False, addMCString='_OFL', splitMC=False, tag=None, forceDb=None, modifiers='')
Definition:
IOVDbSvcConfig.py:153
Trk::open
@ open
Definition:
BinningType.h:40
LArBadFebCondAlg
Definition:
LArBadFebCondAlg.h:16
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition:
AllConfigFlags.py:19
Generated on Thu Nov 7 2024 21:19:16 for ATLAS Offline Software by
1.8.18