ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileRecAlgs
python
TileRawChannelToHitConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
"""Define method to construct configured TileRawChannelToHit algorithm"""
4
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
TileConfiguration.TileConfigFlags
import
TileRunType
8
9
def
TileRawChannelToHitCfg
(flags, **kwargs):
10
"""Return component accumulator with configured TileRawChannelToHit algorithm
11
12
Arguments:
13
flags -- Athena configuration flags
14
"""
15
16
kwargs.setdefault(
'UseSamplFract'
,
False
)
17
18
acc = ComponentAccumulator()
19
20
from
TileConditions.TileCablingSvcConfig
import
TileCablingSvcCfg
21
acc.merge( TileCablingSvcCfg(flags) )
22
23
if
kwargs[
'UseSamplFract'
]:
24
from
TileConditions.TileSamplingFractionConfig
import
TileSamplingFractionCondAlgCfg
25
acc.merge( TileSamplingFractionCondAlgCfg(flags) )
26
27
if
'TileCondToolEmscale'
not
in
kwargs:
28
from
TileConditions.TileEMScaleConfig
import
TileCondToolEmscaleCfg
29
emScaleTool = acc.popToolsAndMerge( TileCondToolEmscaleCfg(flags) )
30
kwargs[
'TileCondToolEmscale'
] = emScaleTool
31
32
TileRawChannelToHit = CompFactory.TileRawChannelToHit
33
acc.addEventAlgo(
TileRawChannelToHit
(**kwargs), primary=
True
)
34
35
return
acc
36
37
38
39
if
__name__ ==
"__main__"
:
40
41
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
42
from
AthenaConfiguration.TestDefaults
import
defaultConditionsTags, defaultGeometryTags, defaultTestFiles
43
from
AthenaCommon.Logging
import
log
44
from
AthenaCommon.Constants
import
INFO
45
46
# Test setup
47
log.setLevel(INFO)
48
49
flags = initConfigFlags()
50
flags.Input.Files = defaultTestFiles.RAW_RUN3
51
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
52
flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA
53
flags.Tile.RunType = TileRunType.PHY
54
flags.Exec.MaxEvents = 3
55
flags.fillFromArgs()
56
flags.lock()
57
58
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
59
cfg = MainServicesCfg(flags)
60
61
from
TileByteStream.TileByteStreamConfig
import
TileRawDataReadingCfg
62
cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=
False
, readDigits=
False
) )
63
64
cfg.merge(
TileRawChannelToHitCfg
(flags) )
65
66
flags.dump()
67
cfg.printConfig(withDetails=
True
, summariseProps=
True
)
68
cfg.store( open(
'TileRawChannelToHit.pkl'
,
'wb'
) )
69
70
sc = cfg.run()
71
72
import
sys
73
# Success should be 0
74
sys.exit(
not
sc.isSuccess())
75
TileRawChannelToHit
Definition
TileRawChannelToHit.h:56
Constants
TileRawChannelToHitConfig.TileRawChannelToHitCfg
TileRawChannelToHitCfg(flags, **kwargs)
Definition
TileRawChannelToHitConfig.py:9
Generated on
for ATLAS Offline Software by
1.17.0