ATLAS Offline Software
Functions | Variables
python.PoolAttributeHelper Namespace Reference

Functions

def setPoolAttribute (**kwargs)
 
def setFileCompAlg (fileName=None, compAlg=None)
 
def setFileCompLvl (fileName=None, compLvl=None)
 
def setMaxBufferSize (fileName=None, bufferSize=None)
 
def setMinBufferEntries (fileName=None, nEntries=None)
 
def setTreeAutoFlush (fileName=None, treeName=None, autoFlush=None)
 
def setContainerSplitLevel (fileName=None, treeName=None, splitLvl=None)
 
def setBranchBasketSize (fileName=None, treeName=None, basketSize=None)
 

Variables

list attrs = []
 
 attrName
 
 attrValue
 

Function Documentation

◆ setBranchBasketSize()

def python.PoolAttributeHelper.setBranchBasketSize (   fileName = None,
  treeName = None,
  basketSize = None 
)
Convenience method for setting the branch basket size for a tree in a given file. 

Definition at line 76 of file PoolAttributeHelper.py.

76 def setBranchBasketSize( fileName = None, treeName = None, basketSize = None ):
77  """ Convenience method for setting the branch basket size for a tree in a given file. """
78 
79  return setPoolAttribute( fileName = fileName,
80  contName = f"TTree={treeName}",
81  attrName = "BRANCH_BASKET_SIZE",
82  attrValue = basketSize )
83 
84 # Main Function: Only to check the basic functionality
85 # Can be run via python PoolAttributeHelper.py

◆ setContainerSplitLevel()

def python.PoolAttributeHelper.setContainerSplitLevel (   fileName = None,
  treeName = None,
  splitLvl = None 
)
Convenience method for setting the split level for a tree in a given file. 

Definition at line 68 of file PoolAttributeHelper.py.

68 def setContainerSplitLevel( fileName = None, treeName = None, splitLvl = None ):
69  """ Convenience method for setting the split level for a tree in a given file. """
70 
71  return setPoolAttribute( fileName = fileName,
72  contName = f"TTree={treeName}",
73  attrName = "CONTAINER_SPLITLEVEL",
74  attrValue = splitLvl )
75 

◆ setFileCompAlg()

def python.PoolAttributeHelper.setFileCompAlg (   fileName = None,
  compAlg = None 
)
Convenience method for setting the compression algorithm for a given file. 

Definition at line 32 of file PoolAttributeHelper.py.

32 def setFileCompAlg( fileName = None, compAlg = None ):
33  """ Convenience method for setting the compression algorithm for a given file. """
34 
35  return setPoolAttribute( fileName = fileName,
36  attrName = "COMPRESSION_ALGORITHM",
37  attrValue = compAlg )
38 

◆ setFileCompLvl()

def python.PoolAttributeHelper.setFileCompLvl (   fileName = None,
  compLvl = None 
)
Convenience method for setting the compression level for a given file. 

Definition at line 39 of file PoolAttributeHelper.py.

39 def setFileCompLvl( fileName = None, compLvl = None ):
40  """ Convenience method for setting the compression level for a given file. """
41 
42  return setPoolAttribute( fileName = fileName,
43  attrName = "COMPRESSION_LEVEL",
44  attrValue = compLvl )
45 

◆ setMaxBufferSize()

def python.PoolAttributeHelper.setMaxBufferSize (   fileName = None,
  bufferSize = None 
)
Convenience method for setting the maximum basket buffer size 

Definition at line 46 of file PoolAttributeHelper.py.

46 def setMaxBufferSize( fileName = None, bufferSize = None ):
47  """ Convenience method for setting the maximum basket buffer size """
48 
49  return setPoolAttribute( fileName = fileName,
50  attrName = "MAXIMUM_BUFFERSIZE",
51  attrValue = bufferSize )
52 

◆ setMinBufferEntries()

def python.PoolAttributeHelper.setMinBufferEntries (   fileName = None,
  nEntries = None 
)
Convenience method for setting the minimum basket buffer entries 

Definition at line 53 of file PoolAttributeHelper.py.

53 def setMinBufferEntries( fileName = None, nEntries = None ):
54  """ Convenience method for setting the minimum basket buffer entries """
55 
56  return setPoolAttribute( fileName = fileName,
57  attrName = "MINIMUM_BUFFERENTRIES",
58  attrValue = nEntries )
59 

◆ setPoolAttribute()

def python.PoolAttributeHelper.setPoolAttribute ( **  kwargs)
The low-level function that builds the requested Pool Attribure string. 

Definition at line 5 of file PoolAttributeHelper.py.

5 def setPoolAttribute( **kwargs ):
6  """ The low-level function that builds the requested Pool Attribure string. """
7 
8  # Resolve the variables for convenience
9  fileName = kwargs.get('fileName')
10  contName = kwargs.get('contName')
11  attrName = kwargs.get('attrName')
12  attrValue = kwargs.get('attrValue')
13 
14  # Now let's build the string
15  result = ""
16 
17  # First set the domain attribute
18  if not attrName or not attrValue:
19  return result
20  result += f"{attrName} = '{attrValue}';"
21 
22  # Then set database and container level attributes
23  # These are optional: can set both, only one, or neither
24  if contName:
25  result = f"ContainerName = '{contName}'; {result}"
26  if fileName:
27  result = f"DatabaseName = '{fileName}'; {result}"
28 
29  # Finally return the result
30  return result
31 

◆ setTreeAutoFlush()

def python.PoolAttributeHelper.setTreeAutoFlush (   fileName = None,
  treeName = None,
  autoFlush = None 
)
Convenience method for setting the AutoFlush for a tree in a given file. 

Definition at line 60 of file PoolAttributeHelper.py.

60 def setTreeAutoFlush( fileName = None, treeName = None, autoFlush = None ):
61  """ Convenience method for setting the AutoFlush for a tree in a given file. """
62 
63  return setPoolAttribute( fileName = fileName,
64  contName = f"TTree={treeName}",
65  attrName = "TREE_AUTO_FLUSH",
66  attrValue = autoFlush )
67 

Variable Documentation

◆ attrName

python.PoolAttributeHelper.attrName

Definition at line 100 of file PoolAttributeHelper.py.

◆ attrs

list python.PoolAttributeHelper.attrs = []

Definition at line 89 of file PoolAttributeHelper.py.

◆ attrValue

python.PoolAttributeHelper.attrValue

Definition at line 100 of file PoolAttributeHelper.py.

python.PoolAttributeHelper.setTreeAutoFlush
def setTreeAutoFlush(fileName=None, treeName=None, autoFlush=None)
Definition: PoolAttributeHelper.py:60
python.PoolAttributeHelper.setFileCompLvl
def setFileCompLvl(fileName=None, compLvl=None)
Definition: PoolAttributeHelper.py:39
python.PoolAttributeHelper.setMinBufferEntries
def setMinBufferEntries(fileName=None, nEntries=None)
Definition: PoolAttributeHelper.py:53
python.PoolAttributeHelper.setPoolAttribute
def setPoolAttribute(**kwargs)
Definition: PoolAttributeHelper.py:5
python.PoolAttributeHelper.setBranchBasketSize
def setBranchBasketSize(fileName=None, treeName=None, basketSize=None)
Definition: PoolAttributeHelper.py:76
python.PoolAttributeHelper.setFileCompAlg
def setFileCompAlg(fileName=None, compAlg=None)
Definition: PoolAttributeHelper.py:32
python.PoolAttributeHelper.setContainerSplitLevel
def setContainerSplitLevel(fileName=None, treeName=None, splitLvl=None)
Definition: PoolAttributeHelper.py:68
python.PoolAttributeHelper.setMaxBufferSize
def setMaxBufferSize(fileName=None, bufferSize=None)
Definition: PoolAttributeHelper.py:46