ATLAS Offline Software
testSCTEncodeNewConf.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 if __name__ == "__main__":
6  from AthenaConfiguration.AllConfigFlags import initConfigFlags
7  flags = initConfigFlags()
8  flags.Input.isMC = True
9  flags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]
10  flags.IOVDb.GlobalTag = "OFLCOND-RUN12-SDR-31"
11  flags.Detector.GeometrySCT = True
12  flags.lock()
13 
14  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
15  acc = MainServicesCfg(flags)
16 
17  # For POOL file reading
18  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
19  acc.merge(PoolReadCfg(flags))
20 
21  # For ByteStream file writing
22  from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamWriteCfg
23  writingAcc = ByteStreamWriteCfg(flags, [ "SCT_RDO_Container#SCT_RDOs" ] )
24  writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamType = "EventStorage"
25  writingAcc.getService("ByteStreamEventStorageOutputSvc").StreamName = "StreamBSFileOutput"
26  acc.merge(writingAcc)
27 
28  # For SCT geometry and cabling
29  from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
30  acc.merge(SCT_ReadoutGeometryCfg(flags))
31  from SCT_Cabling.SCT_CablingConfig import SCT_CablingToolCfg
32  acc.popToolsAndMerge(SCT_CablingToolCfg(flags))
33 
34  # For EventInfo necessary for ByteStream file writing
35  from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
36  acc.merge(EventInfoCnvAlgCfg(flags,
37  inputKey="McEventInfo",
38  outputKey="EventInfo"))
39 
40  acc.run(maxEvents=10)
python.ByteStreamConfig.ByteStreamWriteCfg
def ByteStreamWriteCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:99
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:51
python.SCT_CablingConfig.SCT_CablingToolCfg
def SCT_CablingToolCfg(flags, name="SCT_CablingTool")
Definition: SCT_CablingConfig.py:35
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69