ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileTBRec
python
TileTBDumpConfig.py
Go to the documentation of this file.
1
2
#
3
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4
#
5
6
7
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
8
from
AthenaConfiguration.ComponentFactory
import
CompFactory
9
10
11
'''
12
@file TileTBDumpConfig.py
13
@brief Python configuration of TileTBDump algorithm for the Run III
14
'''
15
16
17
def
TileTBDumpCfg
(flags, **kwargs):
18
''' Function to configure TileTBDump algorithm.'''
19
20
acc = ComponentAccumulator()
21
22
from
TileConditions.TileCablingSvcConfig
import
TileCablingSvcCfg
23
acc.merge( TileCablingSvcCfg(flags) )
24
25
if
'TileCondToolTiming'
not
in
kwargs:
26
from
TileConditions.TileTimingConfig
import
TileCondToolTimingCfg
27
kwargs[
'TileCondToolTiming'
] = acc.popToolsAndMerge( TileCondToolTimingCfg(flags) )
28
29
if
'TileCondToolEmscale'
not
in
kwargs:
30
from
TileConditions.TileEMScaleConfig
import
TileCondToolEmscaleCfg
31
emScaleTool = acc.popToolsAndMerge( TileCondToolEmscaleCfg(flags) )
32
kwargs[
'TileCondToolEmscale'
] = emScaleTool
33
34
if
'TileCondToolOfcCool'
not
in
kwargs:
35
from
TileConditions.TileOFCConfig
import
TileCondToolOfcCoolCfg
36
kwargs[
'TileCondToolOfcCool'
] = acc.popToolsAndMerge( TileCondToolOfcCoolCfg(flags) )
37
38
acc.addService(CompFactory.ROBDataProviderSvc())
39
40
TileTBDump = CompFactory.TileTBDump
41
acc.addEventAlgo(
TileTBDump
(**kwargs), primary =
True
)
42
43
return
acc
44
45
46
if
__name__==
'__main__'
:
47
48
# Set the Athena configuration flags
49
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
50
flags = initConfigFlags()
51
parser = flags.getArgumentParser()
52
parser.add_argument(
'--postExec'
, help=
'Code to execute after setup'
)
53
args, _ = parser.parse_known_args()
54
55
# Setup logs
56
from
AthenaCommon.Logging
import
log
57
from
AthenaCommon.Constants
import
INFO
58
log.setLevel(INFO)
59
60
from
AthenaConfiguration.TestDefaults
import
defaultConditionsTags, defaultGeometryTags, defaultTestFiles
61
flags.Input.Files = defaultTestFiles.RAW_RUN2
62
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
63
flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_DATA
64
flags.Exec.MaxEvents = 3
65
flags.fillFromArgs(parser=parser)
66
67
flags.lock()
68
69
flags.dump()
70
71
# Initialize configuration object, add accumulator, merge, and run.
72
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
73
cfg = MainServicesCfg(flags)
74
75
from
ByteStreamCnvSvc.ByteStreamConfig
import
ByteStreamReadCfg
76
cfg.merge( ByteStreamReadCfg(flags) )
77
78
cfg.merge(
TileTBDumpCfg
(flags) )
79
80
# Any last things to do?
81
if
args.postExec:
82
log.info(
'Executing postExec: %s'
, args.postExec)
83
exec(args.postExec)
84
85
cfg.printConfig(withDetails=
True
, summariseProps=
True
)
86
87
sc = cfg.run()
88
89
import
sys
90
# Success should be 0
91
sys.exit(0
if
sc.isSuccess()
else
1)
TileTBDump
TileTBDump produces formatted dump for both RawChannels and Digits Properties (JobOption Parameters):...
Definition
TileTBDump.h:59
Constants
TileTBDumpConfig.TileTBDumpCfg
TileTBDumpCfg(flags, **kwargs)
Definition
TileTBDumpConfig.py:17
Generated on
for ATLAS Offline Software by
1.17.0