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 85 of file TupleUtils.py.
85 def nTuple(dirpath, ID, ID2=None, topdir=None, LUN="FILE1"):
87 Retrieve 'Smart'-N-tuple object.
88 N-tuple is booked on-demand.
91 The logical unit LUN must be configured by N-Tuple Service
93 Retrieve (book-n-demand) N-Tuple using
94 the directory name and the title:
95 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
96 'N-tuple title' , ## the title for N-Tuple
97 LUN = 'FILE1' ) ## logical file unit
99 Retrieve (book-n-demand) N-Tuple using
100 the directory name, literal ID and the title:
101 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
102 'Tuple1' , ## the literal ID for N-Tuple
103 'N-tuple title' , ## the title for N-Tuple
104 LUN = 'FILE1' ) ## logical file unit
106 Retrieve (book-n-demand) N-Tuple using
107 the directory name, numerical ID and the title:
108 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
109 124 , ## the numerical ID for N-Tuple
110 'N-tuple title' , ## the title for N-Tuple
111 LUN = 'FILE1' ) ## logical file unit
118 name =
"Tuple" + LUN +
"/"
125 name = name.replace(
".",
"_")
126 name = name.replace(
"/",
"_")
127 name = name.replace(
"\\",
"_")
128 name = name.replace(
" ",
"_")
134 t0.NTupleDir = dirpath
135 t0.PropertiesPrint =
False
138 t0.NTupleTopDir = topdir
141 tool = toolSvc.create(
"TupleTool", name, interface=_Tool)
145 if t1.NTupleLUN != LUN:
147 if t1.NTupleDir != dirpath:
148 t1.NTupleDir = dirpath
149 if topdir
and (t1.NTupleTopDir != topdir):
150 t1.NTupleTopDir = topdir
154 return tool.nTuple(ID)
156 return tool.nTuple(ID, ID2)
159 nTuple.__doc__ +=
"\n\t help(ITupleTool.nTuple) : \n" + _Tool.nTuple.__doc__