6 def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=False, Calib2=False):
15 L1CaloFolders[
'PhysicsKeys'] = [
'/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib']
17 if not flags.Input.isMC:
20 L1CaloFolders[
'PhysicsKeys'] += [
'/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCommon',
21 '/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanHighMu',
22 '/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanLowMu']
24 L1CaloFolders[
'Calib1Keys'] = [
'/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanCalib',
25 '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanCommon',
26 '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanHighMu',
27 '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanLowMu']
29 L1CaloFolders[
'Calib2Keys'] = [
'/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanCalib',
30 '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanCommon',
31 '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanHighMu',
32 '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanLowMu']
34 L1CaloFolders[
'ReadoutConfig'] =
"/TRIGGER/L1Calo/V2/Configuration/ReadoutConfig"
35 L1CaloFolders[
'ReadoutConfigJSON'] =
"/TRIGGER/L1Calo/V2/Configuration/ReadoutConfigJSON"
36 L1CaloFolders[
'PprChanStrategy'] =
"/TRIGGER/L1Calo/V2/Configuration/PprChanStrategy"
37 L1CaloFolders[
'PpmFineTimeRefs'] =
"/TRIGGER/L1Calo/V1/References/FineTimeReferences"
38 L1CaloFolders[
'RunParameters'] =
"/TRIGGER/L1Calo/V1/Conditions/RunParameters"
39 L1CaloFolders[
'PprChanStrategy'] =
'/TRIGGER/Receivers/Conditions/Strategy'
40 L1CaloFolders[
'DerivedRunPars'] =
'/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars'
43 L1CaloFolders[
'PprChanDefaults'] =
'/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults'
45 ver =
'V2' if flags.Input.isMC
else 'V1'
46 L1CaloFolders[
'DisabledTowers'] = f
'/TRIGGER/L1Calo/{ver}/Conditions/DisabledTowers'
47 L1CaloFolders[
'PpmDeadChannels'] = f
'/TRIGGER/L1Calo/{ver}/Calibration/PpmDeadChannels'
50 from IOVDbSvc.IOVDbSvcConfig
import addFolders
51 db =
'TRIGGER_ONL' if not flags.Input.isMC
else 'TRIGGER_OFL'
52 result =
addFolders(flags,[xx
for x
in L1CaloFolders.values()
if isinstance(x,list)
for xx
in x
if xx!=
""] +
53 [x
for x
in L1CaloFolders.values()
if not isinstance(x,list)], db, className=
'CondAttrListCollection')
55 from AthenaConfiguration.ComponentFactory
import CompFactory
57 alg = CompFactory.L1CaloCondAlg(UsePhysicsRegime = Physics,
58 UseCalib1Regime = Calib1,
59 UseCalib2Regime = Calib2)
60 for k,v
in L1CaloFolders.items(): setattr(alg,k,v)
64 alg.OutputKeyDerRunsPars =
""
65 alg.OutputKeyTimeRefs =
""
66 alg.OutputKeyRunParameters =
""
67 alg.OutputKeyPprChanStrategy =
""
68 alg.OutputKeyPprConditionsRun2 =
""
69 alg.OutputKeyReadoutConfig =
""
70 alg.OutputKeyReadoutConfigJSON =
""
72 result.addCondAlgo(alg)
76 L1CaloCondReader = CompFactory.L1CaloCondAlgReader()
77 result.addEventAlgo(L1CaloCondReader,
'AthAlgSeq')
83 if __name__==
"__main__":
85 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
86 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
89 flags.Input.Files = defaultTestFiles.RAW_RUN2
90 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
91 flags.Exec.MaxEvents = 1
92 flags.IOVDb.GlobalTag =
'CONDBR2-BLKPA-2022-02'
93 flags.Trigger.enableL1CaloLegacy =
True
97 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
98 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
99 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
100 from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig
import LVL1CaloRun2ReadBSCfg
125 sys.exit(acc.run().isFailure())