def __getCacheName(self, wkspname, additional_props=None): """additional_props: list. additional properties to be hashed """ cachedir = self.getProperty('CacheDir').value if len(cachedir) <= 0: return None # fix up the workspace name prefix = wkspname.replace('__', '') propman_properties = [ 'bank', 'd_min', 'd_max', 'tof_min', 'tof_max', 'wavelength_min', 'wavelength_max' ] alignandfocusargs = [] # calculate general properties for name in PROPS_FOR_ALIGN + PROPS_IN_PD_CHARACTER: # skip these because this has been reworked to only worry about information in workspaces if name in (CAL_FILE, GROUP_FILE, CAL_WKSP, GRP_WKSP, MASK_WKSP): continue prop = self.getProperty(name) if name == 'PreserveEvents' or not prop.isDefault: value = prop.valueAsStr # default representation for everything alignandfocusargs.append('%s=%s' % (name, value)) # special calculations for workspaces if self.absorption: alignandfocusargs.append( uniqueDescription('AbsorptionWorkspace', self.absorption)) if self.__calWksp: alignandfocusargs.append( uniqueDescription(CAL_WKSP, self.__calWksp)) if self.__grpWksp: alignandfocusargs.append( uniqueDescription(GRP_WKSP, self.__grpWksp)) if self.__mskWksp: alignandfocusargs.append( uniqueDescription(MASK_WKSP, self.__mskWksp)) alignandfocusargs += additional_props or [] reductionPropertiesName = self.getProperty( 'ReductionProperties').valueAsStr if not PropertyManagerDataService.doesExist(reductionPropertiesName): reductionPropertiesName = '' # do not specify non-existant manager return CreateCacheFilename(Prefix=prefix, PropertyManager=reductionPropertiesName, Properties=propman_properties, OtherProperties=alignandfocusargs, CacheDir=cachedir).OutputFilename
def __getCacheName(self, wkspname, additional_props=None): """additional_props: list. additional properties to be hashed """ cachedir = self.getProperty('CacheDir').value if len(cachedir) <= 0: return None # fix up the workspace name prefix = wkspname.replace('__', '') propman_properties = ['bank', 'd_min', 'd_max', 'tof_min', 'tof_max', 'wavelength_min', 'wavelength_max'] alignandfocusargs = [] # calculate general properties for name in PROPS_FOR_ALIGN + PROPS_IN_PD_CHARACTER: # skip these because this has been reworked to only worry about information in workspaces if name in (CAL_FILE, GROUP_FILE, CAL_WKSP, GRP_WKSP, MASK_WKSP): continue prop = self.getProperty(name) if name == 'PreserveEvents' or not prop.isDefault: value = prop.valueAsStr # default representation for everything alignandfocusargs.append('%s=%s' % (name, value)) # special calculations for workspaces if self.absorption: alignandfocusargs.append(uniqueDescription('AbsorptionWorkspace', self.absorption)) if self.__calWksp: alignandfocusargs.append(uniqueDescription(CAL_WKSP, self.__calWksp)) if self.__grpWksp: alignandfocusargs.append(uniqueDescription(GRP_WKSP, self.__grpWksp)) if self.__mskWksp: alignandfocusargs.append(uniqueDescription(MASK_WKSP, self.__mskWksp)) alignandfocusargs += additional_props or [] reductionPropertiesName = self.getProperty('ReductionProperties').valueAsStr if not PropertyManagerDataService.doesExist(reductionPropertiesName): reductionPropertiesName = '' # do not specify non-existant manager return CreateCacheFilename(Prefix=prefix, PropertyManager=reductionPropertiesName, Properties=propman_properties, OtherProperties=alignandfocusargs, CacheDir=cachedir).OutputFilename
def _clear_property_manager_data_service(): for element in PropertyManagerDataService.getObjectNames(): if PropertyManagerDataService.doesExist(element): PropertyManagerDataService.remove(element)
def _clear_property_manager_data_service(): for element in PropertyManagerDataService.getObjectNames(): if PropertyManagerDataService.doesExist(element): PropertyManagerDataService.remove(element)