ATLAS Offline Software
Loading...
Searching...
No Matches
HitMapBuilderConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthenaConfiguration.AllConfigFlags import initConfigFlags
6
7
8def HitMapBuilderCfg(flags):
9 result=ComponentAccumulator()
10 from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConfig import PixelRawDataProviderAlgCfg
11 result.merge(PixelRawDataProviderAlgCfg(flags))
12
13 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
14 result.merge(ByteStreamReadCfg(flags)) #Arguably, this should be added to PixelRawDataProviderAlgCfg
15
16 from PixelReadoutGeometry.PixelReadoutGeometryConfig import PixelReadoutManagerCfg
17 result.merge(PixelReadoutManagerCfg(flags))
18
19 from PixelConditionsAlgorithms.PixelConditionsConfig import PixelCablingCondAlgCfg
20 result.merge(PixelCablingCondAlgCfg(flags))
21
22 HitMapBuilder=CompFactory.HitMapBuilder()
23 HitMapBuilder.LBMin = 0
24 HitMapBuilder.LBMax = -1
25 result.addEventAlgo(HitMapBuilder)
26
27 result.addService(CompFactory.THistSvc(Output = [ "histfile DATAFILE='HitMap.root' OPT='RECREATE'"]))
28 result.setAppProperty("HistogramPersistency","ROOT")
29
30 return result
31
32
33
34if __name__=="__main__":
35 from AthenaConfiguration.TestDefaults import defaultTestFiles
36 flags = initConfigFlags()
37 flags.Input.Files = defaultTestFiles.RAW_RUN3
38 flags.Concurrency.NumThreads=1
39 flags.Detector.GeometryMuon=False
40 flags.Detector.GeometryTRT=False
41 flags.IOVDb.GlobalTag="CONDBR2-BLKPA-2023-03"
42 flags.GeoModel.AtlasVersion="ATLAS-R3S-2021-03-02-00"
43
44 flags.fillFromArgs()
45 flags.lock()
46
47 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
48 acc = MainServicesCfg(flags)
49
50 acc.merge(HitMapBuilderCfg(flags))
51 acc.getService("AvalancheSchedulerSvc").ShowDataDependencies=True
52
53 acc.run()