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

Variable Documentation

◆ BunchCrossingCondTest

python.BunchCrossingCondAlgConfig.BunchCrossingCondTest = CompFactory.BunchCrossingCondTest

Definition at line 92 of file BunchCrossingCondAlgConfig.py.

◆ DatabaseInstance

python.BunchCrossingCondAlgConfig.DatabaseInstance

Definition at line 73 of file BunchCrossingCondAlgConfig.py.

◆ Files

python.BunchCrossingCondAlgConfig.Files

Definition at line 71 of file BunchCrossingCondAlgConfig.py.

◆ flags

python.BunchCrossingCondAlgConfig.flags = initConfigFlags()

Definition at line 70 of file BunchCrossingCondAlgConfig.py.

◆ GlobalTag

python.BunchCrossingCondAlgConfig.GlobalTag

Definition at line 74 of file BunchCrossingCondAlgConfig.py.

◆ isMC

python.BunchCrossingCondAlgConfig.isMC

Definition at line 72 of file BunchCrossingCondAlgConfig.py.

◆ result

python.BunchCrossingCondAlgConfig.result = MainServicesCfg(flags)

Definition at line 78 of file BunchCrossingCondAlgConfig.py.