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 73 of file TupleUtils.py.
73 def nTuple(dirpath, ID, ID2=None, topdir=None, LUN='FILE1'):
75 Retrieve 'Smart'-N-tuple object. 76 N-tuple is booked on-demand. 79 The logical unit LUN must be configured by N-Tuple Service 81 Retrieve (book-n-demand) N-Tuple using 82 the directory name and the title: 83 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 84 'N-tuple title' , ## the title for N-Tuple 85 LUN = 'FILE1' ) ## logical file unit 87 Retrieve (book-n-demand) N-Tuple using 88 the directory name, literal ID and the title: 89 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 90 'Tuple1' , ## the literal ID for N-Tuple 91 'N-tuple title' , ## the title for N-Tuple 92 LUN = 'FILE1' ) ## logical file unit 94 Retrieve (book-n-demand) N-Tuple using 95 the directory name, numerical ID and the title: 96 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory 97 124 , ## the numerical ID for N-Tuple 98 'N-tuple title' , ## the title for N-Tuple 99 LUN = 'FILE1' ) ## logical file unit 106 name =
'Tuple' + LUN +
"/" 113 name = name.replace(
'.',
'_')
114 name = name.replace(
'/',
'_')
115 name = name.replace(
'\\',
'_')
116 name = name.replace(
' ',
'_')
122 t0.NTupleDir = dirpath
123 t0.PropertiesPrint =
False 126 t0.NTupleTopDir = topdir
129 tool = toolSvc.create(
'TupleTool',
135 if t1.NTupleLUN != LUN:
137 if t1.NTupleDir != dirpath:
138 t1.NTupleDir = dirpath
139 if topdir
and (t1.NTupleTopDir != topdir):
140 t1.NTupleTopDir = topdir
144 return tool.nTuple(ID)
146 return tool.nTuple(ID, ID2)
def nTuple(dirpath, ID, ID2=None, topdir=None, LUN='FILE1')