3 """ A basic module that helps with setting various common Pool Attributes """
6 """ The low-level function that builds the requested Pool Attribure string. """
9 fileName = kwargs.get(
'fileName')
10 contName = kwargs.get(
'contName')
11 attrName = kwargs.get(
'attrName')
12 attrValue = kwargs.get(
'attrValue')
18 if not attrName
or not attrValue:
20 result += f
"{attrName} = '{attrValue}';"
25 result = f
"ContainerName = '{contName}'; {result}"
27 result = f
"DatabaseName = '{fileName}'; {result}"
33 """ Convenience method for setting the compression algorithm for a given file. """
36 attrName =
"COMPRESSION_ALGORITHM",
40 """ Convenience method for setting the compression level for a given file. """
43 attrName =
"COMPRESSION_LEVEL",
47 """ Convenience method for setting the maximum basket buffer size """
50 attrName =
"MAXIMUM_BUFFERSIZE",
51 attrValue = bufferSize )
54 """ Convenience method for setting the minimum basket buffer entries """
57 attrName =
"MINIMUM_BUFFERENTRIES",
58 attrValue = nEntries )
61 """ Convenience method for setting the AutoFlush for a tree in a given file. """
64 contName = f
"TTree={treeName}",
65 attrName =
"TREE_AUTO_FLUSH",
66 attrValue = autoFlush )
69 """ Convenience method for setting the split level for a tree in a given file. """
72 contName = f
"TTree={treeName}",
73 attrName =
"CONTAINER_SPLITLEVEL",
74 attrValue = splitLvl )
77 """ Convenience method for setting the branch basket size for a tree in a given file. """
80 contName = f
"TTree={treeName}",
81 attrName =
"BRANCH_BASKET_SIZE",
82 attrValue = basketSize )
86 if "__main__" in __name__: