Retrieve 'Smart'-N-tuple object.
N-tuple is booked on-demand.
Atetntion !!
The logical unit LUN must be configured by N-Tuple Service
Retrieve (book-n-demand) N-Tuple using
the directory name and the title:
>>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
'N-tuple title' , ## the title for N-Tuple
LUN = 'FILE1' ) ## logical file unit
Retrieve (book-n-demand) N-Tuple using
the directory name, literal ID and the title:
>>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
'Tuple1' , ## the literal ID for N-Tuple
'N-tuple title' , ## the title for N-Tuple
LUN = 'FILE1' ) ## logical file unit
Retrieve (book-n-demand) N-Tuple using
the directory name, numerical ID and the title:
>>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
124 , ## the numerical ID for N-Tuple
'N-tuple title' , ## the title for N-Tuple
LUN = 'FILE1' ) ## logical file unit
Definition at line 74 of file TupleUtils.py.
74 def nTuple(dirpath, ID, ID2=None, topdir=None, LUN='FILE1'):
76 Retrieve 'Smart'-N-tuple object. 77 N-tuple is booked on-demand. 80 The logical unit LUN must be configured by N-Tuple Service 82 Retrieve (book-n-demand) N-Tuple using 83 the directory name and the title: 84 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 85 'N-tuple title' , ## the title for N-Tuple 86 LUN = 'FILE1' ) ## logical file unit 88 Retrieve (book-n-demand) N-Tuple using 89 the directory name, literal ID and the title: 90 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 91 'Tuple1' , ## the literal ID for N-Tuple 92 'N-tuple title' , ## the title for N-Tuple 93 LUN = 'FILE1' ) ## logical file unit 95 Retrieve (book-n-demand) N-Tuple using 96 the directory name, numerical ID and the title: 97 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 98 124 , ## the numerical ID for N-Tuple 99 'N-tuple title' , ## the title for N-Tuple 100 LUN = 'FILE1' ) ## logical file unit 107 name =
'Tuple' + LUN +
"/" 114 name = name.replace(
'.',
'_')
115 name = name.replace(
'/',
'_')
116 name = name.replace(
'\\',
'_')
117 name = name.replace(
' ',
'_')
123 t0.NTupleDir = dirpath
124 t0.PropertiesPrint =
False 127 t0.NTupleTopDir = topdir
130 tool = toolSvc.create(
'TupleTool', name, interface=_Tool)
134 if t1.NTupleLUN != LUN:
136 if t1.NTupleDir != dirpath:
137 t1.NTupleDir = dirpath
138 if topdir
and (t1.NTupleTopDir != topdir):
139 t1.NTupleTopDir = topdir
143 return tool.nTuple(ID)
145 return tool.nTuple(ID, ID2)
def _getToolSvc(**kwargs)
def nTuple(dirpath, ID, ID2=None, topdir=None, LUN='FILE1')