Home | Trees | Indices | Help |
---|
|
1 from common import * 2 from Transform import Transform 3 from Ganga.Utility.util import containsGangaObjects,isNestedList 4 from TaskApplication import ArgSplitterTask 57 _schema = Schema(Version(1,0), dict(Transform._schema.datadict.items() + { 8 'args' : SimpleItem(defvalue=[],typelist=['list','Ganga.GPIDev.Lib.GangaList.GangaList.GangaList'],sequence=1,checkset='_checksetNestedLists',doc='A list of lists of arguments to pass to script'), 9 }.items())) 10 _category = 'transforms' 11 _name = 'ArgTransform' 12 _exportmethods = Transform._exportmethods 13 14 # Copied from ISplitter4016 """The rule is that if there are nested lists then they 17 must not contain GangaObjects, as this corrupts the repository""" 18 if isNestedList(value) and containsGangaObjects(value): 19 raise TypeMismatchError('Assigning nested lists which contain Ganga GPI Objects is not supported.')2022 nargs = len(self.args) 23 self.setPartitionsStatus(range(1,nargs+1), "ready") 24 if "_partition_status" in self._data: 25 self.setPartitionsLimit(nargs+1)2628 """Create Ganga Jobs for the next N partitions that are ready and submit them.""" 29 j = self.createNewJob(partitions[0]) 30 if len(partitions) > 1: 31 j.splitter = ArgSplitterTask() 32 j.splitter.args = [self.args[p-1] for p in partitions] 33 j.splitter.task_partitions = partitions 34 else: 35 p = partitions[0] 36 if (p < 1 or p > len(self.args)): 37 raise ApplicationConfigurationError("Partition %i did not find a corresponding argment!", p) 38 j.application.args = self.args[p-1] 39 return [j]
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 25 10:35:32 2012 | http://epydoc.sourceforge.net |