ATLAS Offline Software
egammaLargeClusterMakerConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 __doc__ = """ Configure egammaLargeClusterMaker,
4  which chooses cells to store in the AOD"""
5 __author__ = "Jovan Mitrevski"
6 
7 from AthenaCommon.Logging import logging
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10 
11 
12 def egammaLargeClusterMakerCfg(flags, name="egammaLCMakerTool", **kwargs):
13 
14  acc = ComponentAccumulator()
15 
16  kwargs.setdefault("CellsName", flags.Egamma.Keys.Input.CaloCells)
17  kwargs.setdefault("InputClusterCollection",
18  flags.Egamma.Keys.Output.CaloClusters)
19  acc.setPrivateTools(CompFactory.egammaLargeClusterMaker(name, **kwargs))
20 
21  return acc
22 
23 
24 if __name__ == "__main__":
25 
26  from AthenaConfiguration.AllConfigFlags import initConfigFlags
27  from AthenaConfiguration.ComponentAccumulator import printProperties
28  from AthenaConfiguration.TestDefaults import defaultTestFiles
29  flags = initConfigFlags()
30  flags.Input.Files = defaultTestFiles.RDO_RUN2
31  flags.fillFromArgs()
32  flags.lock()
33  flags.dump()
34 
36  mlog = logging.getLogger("egammaLargeClusterMakerConfigTest")
37  mlog.info("Configuring egammaLargeClusterMaker: ")
38  printProperties(mlog, cfg.popToolsAndMerge(
40  nestLevel=1,
41  printDefaults=True)
42 
43  f = open("egammalargeclustermaker.pkl", "wb")
44  cfg.store(f)
45  f.close()
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
egammaLargeClusterMakerConfig.egammaLargeClusterMakerCfg
def egammaLargeClusterMakerCfg(flags, name="egammaLCMakerTool", **kwargs)
Definition: egammaLargeClusterMakerConfig.py:12
extractSporadic.printProperties
def printProperties(h, q, hLB)
Definition: extractSporadic.py:8
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19