ATLAS Offline Software
HitMapBuilderConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.AllConfigFlags import initConfigFlags
6 
7 
8 def 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 
34 if __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 
43  flags.fillFromArgs()
44  flags.lock()
45 
46  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
47  acc = MainServicesCfg(flags)
48 
49  acc.merge(HitMapBuilderCfg(flags))
50  acc.getService("AvalancheSchedulerSvc").ShowDataDependencies=True
51 
52  acc.run()
PixelRawDataByteStreamCnvConfig.PixelRawDataProviderAlgCfg
def PixelRawDataProviderAlgCfg(flags, RDOKey="PixelRDOs", **kwargs)
Definition: PixelRawDataByteStreamCnvConfig.py:15
HitMapBuilderConfig.HitMapBuilderCfg
def HitMapBuilderCfg(flags)
Definition: HitMapBuilderConfig.py:8
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
PixelConditionsConfig.PixelCablingCondAlgCfg
def PixelCablingCondAlgCfg(flags, name="PixelCablingCondAlg", **kwargs)
Definition: PixelConditionsConfig.py:109
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PixelReadoutGeometryConfig.PixelReadoutManagerCfg
def PixelReadoutManagerCfg(flags, name="PixelReadoutManager", **kwargs)
Definition: PixelReadoutGeometryConfig.py:6