@@ -137,14 +137,25 @@ def toTimescale(self, timescale_list):
137137 except Exception as e :
138138 self ._log .warning ('exception in timescale:{}' .format (e ))
139139
140- def search (self , pattern ):
141- """Search for parameter names . Wildcard is '%'."""
140+ def getVariables (self ,pattern ):
141+ """Get Variable from pattern . Wildcard is '%'."""
142142 VariableDataType = (jpype .JPackage ('cern' ).accsoft .cals .extr .domain
143143 .core .constants .VariableDataType )
144144 types = VariableDataType .ALL
145- v = self ._md .getVariablesOfDataTypeWithNameLikePattern (pattern , types )
146- return v .toString ()[1 :- 1 ].split (', ' )
147-
145+ v = self ._md .getVariablesOfDataTypeWithNameLikePattern (pattern , types )
146+ return list (v .getVariables ())
147+ def search (self , pattern ):
148+ """Search for parameter names. Wildcard is '%'."""
149+ return [vv .getVariableName () for vv in self .getVariables (pattern )]
150+
151+ def getDescription (self ,pattern ):
152+ """Get Variable Description from pattern. Wildcard is '%'."""
153+ return dict ([(vv .getVariableName (),vv .getDescription ())
154+ for vv in self .getVariables (pattern )])
155+ def getUnit (self ,pattern ):
156+ """Get Variable Unit from pattern. Wildcard is '%'."""
157+ return dict ([(vv .getVariableName (),vv .getUnit ())
158+ for vv in self .getVariables (pattern )])
148159 def getFundamentals (self , t1 , t2 , fundamental ):
149160 self ._log .info (
150161 'Querying fundamentals (pattern: {0}):' .format (fundamental )
0 commit comments