ATLAS Offline Software
CaloBCIDAvgAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 # File: CaloRec/python/CaloBCIDAvgAlgConfig.py
4 # Created: Mar 2019, sss
5 # Purpose: Configure CaloBCIDAvgAlg.
6 
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from AthenaConfiguration.Enums import ProductionStep
10 
11 def CaloBCIDAvgAlgCfg (flags, **kwargs):
12  CaloBCIDAvgAlg=CompFactory.CaloBCIDAvgAlg
13 
14  result = ComponentAccumulator()
15 
16  from LArRecUtils.LArRecUtilsConfig import LArMCSymCondAlgCfg
17  result.merge (LArMCSymCondAlgCfg (flags))
18 
19  from CaloRec.CaloBCIDLumiCondAlgConfig import CaloBCIDLumiCondAlgCfg
20  result.merge (CaloBCIDLumiCondAlgCfg (flags))
21  if flags.Common.ProductionStep is ProductionStep.PileUpPretracking:
22  kwargs.setdefault("EventInfoKey", flags.Overlay.BkgPrefix + "EventInfo")
23  result.addEventAlgo (CaloBCIDAvgAlg(**kwargs))
24  return result
25 
26 
27 
28 if __name__ == "__main__":
29  from AthenaConfiguration.AllConfigFlags import initConfigFlags
30  from AthenaConfiguration.TestDefaults import defaultGeometryTags
31 
32  only = ['CaloBCIDAvgAlg',
33  'CaloBCIDCoeffsCondAlg',
34  'CaloBCIDLumiCondAlg',
35  'CondInputLoader',
36  'LuminosityCondAlg-',
37  'LArPileUpAvgSymCondAlg',
38  'LArPileUpShapeSymCondAlg',
39  'LArADC2MeVCondAlg-',
40  'LArOFCCondAlg-',
41  'LArAutoCorrTotalCondAlg-',
42  'BunchCrossingCondAlg',
43  ]
44  print ('--- data')
45  flags1 = initConfigFlags()
46  flags1.Input.Files = []
47  flags1.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
48  flags1.lock()
49  acc1 = CaloBCIDAvgAlgCfg (flags1)
50  acc1.printConfig(summariseProps=True, onlyComponents=only)
51  acc1.wasMerged()
52 
53  print ('--- mc')
54  flags2 = initConfigFlags()
55  flags2.Input.Files = []
56  flags2.Input.isMC = True
57  flags2.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
58  flags2.lock()
59  acc2 = CaloBCIDAvgAlgCfg (flags2)
60  acc2.printConfig(summariseProps=True, onlyComponents=only)
61  acc2.wasMerged()
62 
63  print ('--- online')
64  flags3 = initConfigFlags()
65  flags3.Input.Files = []
66  flags3.Common.isOnline = True
67  flags3.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
68  flags3.lock()
69  acc3 = CaloBCIDAvgAlgCfg (flags3)
70  acc3.printConfig(summariseProps=True, onlyComponents=only)
71  acc3.wasMerged()
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.CaloBCIDAvgAlgConfig.CaloBCIDAvgAlgCfg
def CaloBCIDAvgAlgCfg(flags, **kwargs)
Definition: CaloBCIDAvgAlgConfig.py:11
CaloBCIDAvgAlg
Definition: CaloBCIDAvgAlg.h:19
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19