ATLAS Offline Software
Loading...
Searching...
No Matches
RootWriteConfig Namespace Reference

Functions

 RootWriteCfg (flags)
 NtupleOutputStreamCfg (flags, streamName, fileName, ItemList=None, tupleName="physics", forceRead=False)

Function Documentation

◆ NtupleOutputStreamCfg()

RootWriteConfig.NtupleOutputStreamCfg ( flags,
streamName,
fileName,
ItemList = None,
tupleName = "physics",
forceRead = False )
Configure writing an Ntuple output stream.

Definition at line 20 of file RootWriteConfig.py.

20def NtupleOutputStreamCfg(flags, streamName, fileName, ItemList=None, tupleName="physics", forceRead=False):
21 """Configure writing an Ntuple output stream."""
22
23 cfg = RootWriteCfg(flags)
24
25 writingTool = CompFactory.Athena.RootOutputStreamTool(
26 f"{streamName}Tool",
27 TreeName = tupleName,
28 OutputFile = fileName )
29
30 outputStream = CompFactory.Athena.RootNtupleOutputStream(
31 streamName,
32 WritingTool = writingTool,
33 OutputFile = fileName,
34 ItemList = ["RunNumber", "EventNumber"] + ([] if ItemList is None else ItemList),
35 ForceRead = forceRead )
36
37 cfg.addEventAlgo(outputStream, domain='IO')
38 return cfg

◆ RootWriteCfg()

RootWriteConfig.RootWriteCfg ( flags)
Creates a ComponentAccumulator instance containing the
athena services required for ROOT file writing.

Definition at line 7 of file RootWriteConfig.py.

7def RootWriteCfg(flags):
8 """Creates a ComponentAccumulator instance containing the
9 athena services required for ROOT file writing.
10 """
11
12 cfg = ComponentAccumulator()
13
14 cfg.addService( CompFactory.Athena.RootSvc("AthenaRootSvc") )
15 cfg.addService( CompFactory.Athena.RootCnvSvc("AthenaRootCnvSvc") )
16
17 return cfg
18
19