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 83 of file TupleUtils.py.
83 def nTuple(dirpath, ID, ID2=None, topdir=None, LUN="FILE1"):
85 Retrieve 'Smart'-N-tuple object.
86 N-tuple is booked on-demand.
89 The logical unit LUN must be configured by N-Tuple Service
91 Retrieve (book-n-demand) N-Tuple using
92 the directory name and the title:
93 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
94 'N-tuple title' , ## the title for N-Tuple
95 LUN = 'FILE1' ) ## logical file unit
97 Retrieve (book-n-demand) N-Tuple using
98 the directory name, literal ID and the title:
99 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
100 'Tuple1' , ## the literal ID for N-Tuple
101 'N-tuple title' , ## the title for N-Tuple
102 LUN = 'FILE1' ) ## logical file unit
104 Retrieve (book-n-demand) N-Tuple using
105 the directory name, numerical ID and the title:
106 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
107 124 , ## the numerical ID for N-Tuple
108 'N-tuple title' , ## the title for N-Tuple
109 LUN = 'FILE1' ) ## logical file unit
116 name =
"Tuple" + LUN +
"/"
123 name = name.replace(
".",
"_")
124 name = name.replace(
"/",
"_")
125 name = name.replace(
"\\",
"_")
126 name = name.replace(
" ",
"_")
132 t0.NTupleDir = dirpath
133 t0.PropertiesPrint =
False
136 t0.NTupleTopDir = topdir
139 tool = toolSvc.create(
"TupleTool", name, interface=_Tool)
143 if t1.NTupleLUN != LUN:
145 if t1.NTupleDir != dirpath:
146 t1.NTupleDir = dirpath
147 if topdir
and (t1.NTupleTopDir != topdir):
148 t1.NTupleTopDir = topdir
152 return tool.nTuple(ID)
154 return tool.nTuple(ID, ID2)
157 nTuple.__doc__ +=
"\n\t help(ITupleTool.nTuple) : \n" + _Tool.nTuple.__doc__