66 ExistDataHeader = True, **kw):
67 """Configure algorithm for making a D3PD tree.
68
69 Each distinct D3PD tree is make by a separate algorithm.
70 This function is used to configure these algorithms.
71
72 Arguments:
73
74 flags: The configuration flags.
75 name: The name of the algorithm (required).
76 stream: Athena stream for the tuple.
77 file: Name of the file containing the tuple.
78 If it starts with `pool:', then the tree is being emitted
79 into a POOL file. In that case, stream is just the name
80 of the tree.
81 clevel: Compresson level for the output ROOT file. By default it is
82 controlled by the D3PDMakerFlags.CompressionLevel flag, but
83 can be controlled D3PD-by-D3PD as well.
84 autoflush: Allows overriding the global autoflush setting.
85"""
86
87
88
89
90 name = stream + 'D3PDMaker'
91 tuplename = stream
92
93 if file.startswith ('pool:'):
95 IndexMajor = '',
96 IndexMinor = ''))
97
98 TuplePath = f'{file}/{tuplename}'
99
100 else:
101
102 acc.addService (CompFactory.THistSvc (Output = [
103 f"{stream} DATAFILE='{file}' OPT='RECREATE' CL={clevel}"]))
104
106
107 st = CompFactory.AANTupleStream (stream,
108 ExtraRefNames = ['StreamESD',
109 'StreamRDO',
110 'StreamAOD'],
111 OutputName = file,
112 ExistDataHeader = ExistDataHeader,
113 WriteInputDataHeader = True,
114 StreamName = stream)
115 acc.addEventAlgo (st)
116
117 TuplePath = f'/{stream}/{tuplename}'
118
119
121 acc.addPublicTool (registry)
122
124
125 alg = MakerAlg (name, flags, acc,
126 registry = registry,
127 TuplePath = TuplePath,
128 **kw)
129
130 return alg
Work around initialization ordering problems.
Service to create a root-based D3PD.