ATLAS Offline Software
LBDurationCondAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 #
3 # File: LumiBlockComps/python/LBDurationCondAlgConfig.py
4 # Created: May 2019, sss
5 # Purpose: Configure LBDurationCondAlg.
6 #
7 
8 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
11 from IOVDbSvc.IOVDbSvcConfig import addFolders
12 
13 
14 @AccumulatorCache
16  name = 'LBDurationCondAlg'
17  result = ComponentAccumulator()
18 
19  folder = "/TRIGGER/LUMI/LBLB"
20  result.merge (addFolders (flags, folder, 'TRIGGER',
21  className = 'AthenaAttributeList'))
22 
23  LBDurationCondAlg=CompFactory.LBDurationCondAlg
24  alg = LBDurationCondAlg (name,
25  LBLBFolderInputKey = folder,
26  LBDurationOutputKey = 'LBDurationCondData')
27 
28  result.addCondAlgo (alg)
29  return result
30 
31 
32 if __name__ == "__main__":
33  from AthenaConfiguration.AllConfigFlags import initConfigFlags
34  from AthenaConfiguration.TestDefaults import defaultTestFiles
35 
36  print ('--- data')
37  flags1 = initConfigFlags()
38  flags1.Input.Files = defaultTestFiles.RAW_RUN2
39  flags1.lock()
40  acc1 = LBDurationCondAlgCfg (flags1)
41  acc1.printCondAlgs(summariseProps=True)
42  print ('IOVDbSvc:', acc1.getService('IOVDbSvc').Folders)
43  acc1.wasMerged()
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.LBDurationCondAlgConfig.LBDurationCondAlgCfg
def LBDurationCondAlgCfg(flags)
Definition: LBDurationCondAlgConfig.py:15
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19