ATLAS Offline Software
Classes | Functions | Variables
python.MakerAlgConfig Namespace Reference

Classes

class  MakerAlg
 

Functions

def MakerAlgConfig (flags, acc, stream, file, clevel=D3PDMakerFlags.CompressionLevel, autoflush=D3PDMakerFlags.AutoFlush, ExistDataHeader=True, **kw)
 

Variables

 D3PD = CompFactory.D3PD
 

Function Documentation

◆ MakerAlgConfig()

def python.MakerAlgConfig.MakerAlgConfig (   flags,
  acc,
  stream,
  file,
  clevel = D3PDMakerFlags.CompressionLevel,
  autoflush = D3PDMakerFlags.AutoFlush,
  ExistDataHeader = True,
**  kw 
)
Configure algorithm for making a D3PD tree.

Each distinct D3PD tree is make by a separate algorithm.
This function is used to configure these algorithms.

Arguments:

  flags: The configuration flags.
  name: The name of the algorithm (required).
  stream: Athena stream for the tuple.
  file: Name of the file containing the tuple.
        If it starts with `pool:', then the tree is being emitted
        into a POOL file.  In that case, stream is just the name
        of the tree.
  clevel: Compresson level for the output ROOT file. By default it is
          controlled by the D3PDMakerFlags.CompressionLevel flag, but
          can be controlled D3PD-by-D3PD as well.
  autoflush: Allows overriding the global autoflush setting.

Definition at line 63 of file MakerAlgConfig.py.

63 def MakerAlgConfig (flags, acc, stream, file,
64  clevel = D3PDMakerFlags.CompressionLevel,
65  autoflush = D3PDMakerFlags.AutoFlush,
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:'):
94  acc.addService (D3PD.RootD3PDSvc (AutoFlush = autoflush,
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 
105  acc.addService (D3PD.RootD3PDSvc (AutoFlush = autoflush))
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 
120  registry = D3PD.CollectionGetterRegistryTool (name + '_CollectionGetterRegistry')
121  acc.addPublicTool (registry)
122 
123  acc.addEventAlgo (D3PD.DummyInitAlg (name + 'DummyInit'))
124 
125  alg = MakerAlg (name, flags, acc,
126  registry = registry,
127  TuplePath = TuplePath,
128  **kw)
129 
130  return alg

Variable Documentation

◆ D3PD

python.MakerAlgConfig.D3PD = CompFactory.D3PD

Definition at line 14 of file MakerAlgConfig.py.

python.MakerAlgConfig.MakerAlgConfig
def MakerAlgConfig(flags, acc, stream, file, clevel=D3PDMakerFlags.CompressionLevel, autoflush=D3PDMakerFlags.AutoFlush, ExistDataHeader=True, **kw)
Definition: MakerAlgConfig.py:63
D3PD::RootD3PDSvc
Service to create a root-based D3PD.
Definition: RootD3PDSvc.h:39
D3PD::DummyInitAlg
Work around initialization ordering problems.
Definition: DummyInitAlg.h:40
D3PD::CollectionGetterRegistryTool
Tool to keep a registry of collection getter tools.
Definition: CollectionGetterRegistryTool.h:47