ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaTools
python
egammaOQFlagsBuilderConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
""" Configure e/gamma object quality """
4
5
from
AthenaCommon.Logging
import
logging
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
8
9
10
def
egammaOQFlagsBuilderCfg
(flags, name='egammaOQFlagsBuilder', **kwargs):
11
12
mlog = logging.getLogger(name)
13
mlog.debug(
'Start configuration'
)
14
15
from
LArCalibUtils.LArHVScaleConfig
import
LArHVScaleCfg
16
acc = LArHVScaleCfg(flags)
17
18
kwargs.setdefault(
"CellsName"
, flags.Egamma.Keys.Input.CaloCells)
19
kwargs.setdefault(
"affectedTool"
, CompFactory.CaloAffectedTool())
20
21
tool = CompFactory.egammaOQFlagsBuilder(name, **kwargs)
22
acc.setPrivateTools(tool)
23
return
acc
24
25
26
if
__name__ ==
"__main__"
:
27
28
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
29
from
AthenaConfiguration.ComponentAccumulator
import
printProperties
30
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
31
flags = initConfigFlags()
32
flags.Input.Files = defaultTestFiles.RDO_RUN2
33
flags.fillFromArgs()
34
flags.lock()
35
flags.dump()
36
37
cfg = ComponentAccumulator()
38
mlog = logging.getLogger(
"egammaOQFlagsBuilderTest"
)
39
mlog.info(
"Configuring egammaOQFlagsBuilder: "
)
40
printProperties(mlog, cfg.popToolsAndMerge(
41
egammaOQFlagsBuilderCfg
(flags)),
42
nestLevel=1,
43
printDefaults=
True
)
44
45
f = open(
"egammaoqflagsbuilder.pkl"
,
"wb"
)
46
cfg.store(f)
47
f.close()
egammaOQFlagsBuilderConfig.egammaOQFlagsBuilderCfg
egammaOQFlagsBuilderCfg(flags, name='egammaOQFlagsBuilder', **kwargs)
Definition
egammaOQFlagsBuilderConfig.py:10
Generated on
for ATLAS Offline Software by
1.17.0