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[
'DerivedRunPars'] =
'/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars'
42 L1CaloFolders[
'PprChanDefaults'] =
'/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults'
44 ver =
'V2' if flags.Input.isMC
else 'V1'
45 L1CaloFolders[
'DisabledTowers'] = f
'/TRIGGER/L1Calo/{ver}/Conditions/DisabledTowers'
46 L1CaloFolders[
'PpmDeadChannels'] = f
'/TRIGGER/L1Calo/{ver}/Calibration/PpmDeadChannels'
49 from IOVDbSvc.IOVDbSvcConfig
import addFolders
50 db =
'TRIGGER_ONL' if not flags.Input.isMC
else 'TRIGGER_OFL'
51 result =
addFolders(flags,[xx
for x
in L1CaloFolders.values()
if isinstance(x,list)
for xx
in x
if xx!=
""] +
52 [x
for x
in L1CaloFolders.values()
if not isinstance(x,list)], db, className=
'CondAttrListCollection')
54 from AthenaConfiguration.ComponentFactory
import CompFactory
56 alg = CompFactory.L1CaloCondAlg(UsePhysicsRegime = Physics,
57 UseCalib1Regime = Calib1,
58 UseCalib2Regime = Calib2)
59 for k,v
in L1CaloFolders.items(): setattr(alg,k,v)
63 alg.OutputKeyDerRunsPars =
""
64 alg.OutputKeyTimeRefs =
""
65 alg.OutputKeyRunParameters =
""
66 alg.OutputKeyPprChanStrategy =
""
67 alg.OutputKeyPprConditionsRun2 =
""
68 alg.OutputKeyReadoutConfig =
""
69 alg.OutputKeyReadoutConfigJSON =
""
71 result.addCondAlgo(alg)
75 L1CaloCondReader = CompFactory.L1CaloCondAlgReader()
76 result.addEventAlgo(L1CaloCondReader,
'AthAlgSeq')
82 if __name__==
"__main__":
84 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
85 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
88 flags.Input.Files = defaultTestFiles.RAW_RUN2
89 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
90 flags.Exec.MaxEvents = 1
91 flags.IOVDb.GlobalTag =
'CONDBR2-BLKPA-2022-02'
92 flags.Trigger.enableL1CaloLegacy =
True
96 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
97 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
98 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
99 from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig
import LVL1CaloRun2ReadBSCfg
124 sys.exit(acc.run().isFailure())