3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import BunchStructureSource
11 run1 = flags.IOVDb.DatabaseInstance ==
'COMP200'
16 if flags.Beam.BunchStructureSource == BunchStructureSource.MC:
17 folder =
'/Digitization/Parameters'
18 from DigitizationConfig.DigitizationParametersConfig
import readDigitizationParameters
20 elif flags.Beam.BunchStructureSource == BunchStructureSource.FILLPARAMS:
21 folder =
'/TDAQ/OLC/LHC/FILLPARAMS'
22 from IOVDbSvc.IOVDbSvcConfig
import addFolders
23 result.merge(
addFolders(flags,folder,
'TDAQ',className =
'AthenaAttributeList',tag=
'HEAD'))
24 elif flags.Beam.BunchStructureSource == BunchStructureSource.TrigConf:
25 from TrigConfxAOD.TrigConfxAODConfig
import getxAODConfigSvc
27 if cfgsvc.UseInFileMetadata:
28 if 'TriggerMenuJson_BG' not in flags.Input.MetadataItems:
31 from TrigConfigSvc.TrigConfigSvcCfg
import BunchGroupCondAlgCfg
32 flagsWithFile = flags.clone()
33 flagsWithFile.Trigger.triggerConfig =
'FILE'
36 bgkey =
'L1BunchGroup'
40 from TrigConfigSvc.TrigConfigSvcCfg
import BunchGroupCondAlgCfg
42 bgkey =
'L1BunchGroup'
43 elif flags.Beam.BunchStructureSource == BunchStructureSource.Lumi:
44 from .LuminosityCondAlgConfig
import LuminosityCondAlgCfg
47 alg = CompFactory.BunchCrossingCondAlg(
'BunchCrossingCondAlgDefault',
49 FillParamsFolderKey=folder,
50 Mode=flags.Beam.BunchStructureSource.value,
52 L1BunchGroupCondData=bgkey)
54 result.addCondAlgo(alg)
60 if __name__==
"__main__":
61 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
63 flags.Input.Files = []
64 flags.Input.isMC=
False
65 flags.IOVDb.DatabaseInstance=
"CONDBR2"
66 flags.IOVDb.GlobalTag=
"CONDBR2-BLKPA-2017-05"
69 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
72 from McEventSelector.McEventSelectorConfig
import McEventSelectorCfg
76 FirstEvent=1183722158,
79 InitialTimeStamp=1500867637,
84 BunchCrossingCondTest=CompFactory.BunchCrossingCondTest