ATLAS Offline Software
Classes | Functions
OutputStreamAthenaRoot Namespace Reference

Classes

class  AthenaRootNtupleOutputStreamProtect
 backward compat AthenaRootOutputStream = createOutputStream AthenaRootOutputConditionStream = createOutputConditionStream More...
 

Functions

def createNtupleOutputStream (streamName, fileName, tupleName="physics", asAlg=False)
 
def createOutputStream (streamName, fileName="", asAlg=False)
 

Function Documentation

◆ createNtupleOutputStream()

def OutputStreamAthenaRoot.createNtupleOutputStream (   streamName,
  fileName,
  tupleName = "physics",
  asAlg = False 
)

Definition at line 12 of file OutputStreamAthenaRoot.py.

12 def createNtupleOutputStream(streamName, fileName, tupleName="physics", asAlg = False):
13  if asAlg:
14  from AthenaCommon.AlgSequence import AlgSequence
15  topSequence = AlgSequence()
16 
17  # Now do standard output stream
18  writingTool1 = AthenaRootOutputStreamTool( streamName + "Tool" )
19  writingTool1.TreeName = tupleName
20  writingTool1.OutputFile = fileName
21  #writingTool1.
22  cls = AthenaRootNtupleOutputStreamProtect
23  #cls = CfgMgr.Athena__RootNtupleOutputStream
24  outputStream = cls(
25  streamName,
26  WritingTool = writingTool1,
27  ItemList = ["RunNumber",
28  "EventNumber",],
29  #StrictClidMatching = False,
30  )
31  if asAlg:
32  from AthenaCommon.AlgSequence import AlgSequence
33  topSequence += outputStream
34  else:
35  theApp.addOutputStream( outputStream )
36 
37  if fileName != "":
38  outputStream.OutputFile = fileName
39  return outputStream
40 

◆ createOutputStream()

def OutputStreamAthenaRoot.createOutputStream (   streamName,
  fileName = "",
  asAlg = False 
)

Definition at line 41 of file OutputStreamAthenaRoot.py.

41 def createOutputStream( streamName, fileName = "", asAlg = False ):
42  from AthenaServices.AthenaServicesConf import AthenaOutputStream
43  if asAlg:
44  from AthenaCommon.AlgSequence import AlgSequence
45  topSequence = AlgSequence()
46 
47  # Now do standard output stream
48  writingTool1 = AthenaRootOutputStreamTool( streamName + "Tool" )
49  writingTool1.TreeName = "CollectionTree"
50  outputStream = AthenaOutputStream(
51  streamName,
52  WritingTool = writingTool1,
53  ItemList = [ "EventInfo#*" ]
54  )
55  if asAlg:
56  from AthenaCommon.AlgSequence import AlgSequence
57  topSequence += outputStream
58  else:
59  theApp.addOutputStream( outputStream )
60 
61  if fileName != "":
62  outputStream.OutputFile = fileName
63 
64  return outputStream
65 
66 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
CaloClusterListBadChannel.cls
cls
Definition: CaloClusterListBadChannel.py:8
OutputStreamAthenaRoot.createOutputStream
def createOutputStream(streamName, fileName="", asAlg=False)
Definition: OutputStreamAthenaRoot.py:41
OutputStreamAthenaRoot.createNtupleOutputStream
def createNtupleOutputStream(streamName, fileName, tupleName="physics", asAlg=False)
Definition: OutputStreamAthenaRoot.py:12
AthenaOutputStream
algorithm that marks for write data objects in SG
Definition: AthenaOutputStream.h:55