ATLAS Offline Software
Loading...
Searching...
No Matches
python.BunchCrossingCondAlgConfig Namespace Reference

Functions

 BunchCrossingCondAlgCfg (flags)

Variables

 flags = initConfigFlags()
 Files
 isMC
 DatabaseInstance
 GlobalTag
 result = MainServicesCfg(flags)
 BunchCrossingCondTest = CompFactory.BunchCrossingCondTest

Function Documentation

◆ BunchCrossingCondAlgCfg()

python.BunchCrossingCondAlgConfig.BunchCrossingCondAlgCfg ( flags)

Definition at line 8 of file BunchCrossingCondAlgConfig.py.

8def BunchCrossingCondAlgCfg(flags):
9 result=ComponentAccumulator()
10
11 run1 = flags.IOVDb.DatabaseInstance == 'COMP200'
12 cfgsvc = None
13 folder = ''
14 bgkey = ''
15 bsmdkey = ''
16
17 if flags.Beam.BunchStructureSource == BunchStructureSource.MC:
18 # Only read digitization parameters from conditions DB if NOT ByteStream input
19 # For ByteStream input, the metadata will be read from BS metadata instead
20 from AthenaConfiguration.Enums import Format
21 # Special case: if no input files, treat as non-BS even if format defaults to BS
22 if flags.Input.Format != Format.BS or not flags.Input.Files:
23 folder = '/Digitization/Parameters'
24 from DigitizationConfig.DigitizationParametersConfig import readDigitizationParameters
25 result.merge(readDigitizationParameters(flags))
26 else:
27 # For ByteStream input, don't set folder key - will read from BS metadata
28 folder = ''
29 bsmdkey = 'MetaDataStore+ByteStreamMetadata'
30
31 elif flags.Beam.BunchStructureSource == BunchStructureSource.FILLPARAMS:
32 folder = '/TDAQ/OLC/LHC/FILLPARAMS'
33 from IOVDbSvc.IOVDbSvcConfig import addFolders
34 result.merge(addFolders(flags,folder,'TDAQ',className = 'AthenaAttributeList',tag='HEAD'))
35 elif flags.Beam.BunchStructureSource == BunchStructureSource.TrigConf:
36 from TrigConfxAOD.TrigConfxAODConfig import getxAODConfigSvc
37 cfgsvc = result.getPrimaryAndMerge(getxAODConfigSvc(flags))
38 if cfgsvc.UseInFileMetadata:
39 if 'TriggerMenuJson_BG' not in flags.Input.MetadataItems:
40 # this is for when we need to configure the BunchGroupCondAlg with info extracted from converted JSON
41 # in this case avoid using the xAODConfigSvc, because it will be set up incorrectly
42 from TrigConfigSvc.TrigConfigSvcCfg import BunchGroupCondAlgCfg
43 flagsWithFile = flags.clone()
44 flagsWithFile.Trigger.triggerConfig = 'FILE'
45 flagsWithFile.lock()
46 result.merge(BunchGroupCondAlgCfg(flagsWithFile))
47 bgkey = 'L1BunchGroup'
48 else: # trust that we can use the in-file metadata
49 bgkey = ''
50 else:
51 from TrigConfigSvc.TrigConfigSvcCfg import BunchGroupCondAlgCfg
52 result.merge(BunchGroupCondAlgCfg(flags))
53 bgkey = 'L1BunchGroup'
54 elif flags.Beam.BunchStructureSource == BunchStructureSource.Lumi:
55 from .LuminosityCondAlgConfig import LuminosityCondAlgCfg
56 result.merge(LuminosityCondAlgCfg(flags))
57
58 alg = CompFactory.BunchCrossingCondAlg('BunchCrossingCondAlgDefault',
59 Run1=run1,
60 FillParamsFolderKey=folder,
61 Mode=flags.Beam.BunchStructureSource.value,
62 TrigConfigSvc=cfgsvc,
63 L1BunchGroupCondData=bgkey,
64 ByteStreamMetadataKey=bsmdkey)
65
66 result.addCondAlgo(alg)
67
68 return result
69
70
71

Variable Documentation

◆ BunchCrossingCondTest

python.BunchCrossingCondAlgConfig.BunchCrossingCondTest = CompFactory.BunchCrossingCondTest

Definition at line 96 of file BunchCrossingCondAlgConfig.py.

◆ DatabaseInstance

python.BunchCrossingCondAlgConfig.DatabaseInstance

Definition at line 77 of file BunchCrossingCondAlgConfig.py.

◆ Files

python.BunchCrossingCondAlgConfig.Files

Definition at line 75 of file BunchCrossingCondAlgConfig.py.

◆ flags

python.BunchCrossingCondAlgConfig.flags = initConfigFlags()

Definition at line 74 of file BunchCrossingCondAlgConfig.py.

◆ GlobalTag

python.BunchCrossingCondAlgConfig.GlobalTag

Definition at line 78 of file BunchCrossingCondAlgConfig.py.

◆ isMC

python.BunchCrossingCondAlgConfig.isMC

Definition at line 76 of file BunchCrossingCondAlgConfig.py.

◆ result

python.BunchCrossingCondAlgConfig.result = MainServicesCfg(flags)

Definition at line 82 of file BunchCrossingCondAlgConfig.py.