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 84 of file TupleUtils.py.
84 def nTuple(dirpath, ID, ID2=None, topdir=None, LUN="FILE1"):
86 Retrieve 'Smart'-N-tuple object.
87 N-tuple is booked on-demand.
90 The logical unit LUN must be configured by N-Tuple Service
92 Retrieve (book-n-demand) N-Tuple using
93 the directory name and the title:
94 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
95 'N-tuple title' , ## the title for N-Tuple
96 LUN = 'FILE1' ) ## logical file unit
98 Retrieve (book-n-demand) N-Tuple using
99 the directory name, literal ID and the title:
100 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
101 'Tuple1' , ## the literal ID for N-Tuple
102 'N-tuple title' , ## the title for N-Tuple
103 LUN = 'FILE1' ) ## logical file unit
105 Retrieve (book-n-demand) N-Tuple using
106 the directory name, numerical ID and the title:
107 >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory
108 124 , ## the numerical ID for N-Tuple
109 'N-tuple title' , ## the title for N-Tuple
110 LUN = 'FILE1' ) ## logical file unit
117 name =
"Tuple" + LUN +
"/"
124 name = name.replace(
".",
"_")
125 name = name.replace(
"/",
"_")
126 name = name.replace(
"\\",
"_")
127 name = name.replace(
" ",
"_")
133 t0.NTupleDir = dirpath
134 t0.PropertiesPrint =
False
137 t0.NTupleTopDir = topdir
140 tool = toolSvc.create(
"TupleTool", name, interface=_Tool)
144 if t1.NTupleLUN != LUN:
146 if t1.NTupleDir != dirpath:
147 t1.NTupleDir = dirpath
148 if topdir
and (t1.NTupleTopDir != topdir):
149 t1.NTupleTopDir = topdir
153 return tool.nTuple(ID)
155 return tool.nTuple(ID, ID2)
158 nTuple.__doc__ +=
"\n\t help(ITupleTool.nTuple) : \n" + _Tool.nTuple.__doc__