Package Ganga :: Package GPIDev :: Package Adapters :: Module IMerger
[hide private]
[frames] | no frames]

Source Code for Module Ganga.GPIDev.Adapters.IMerger

 1  ################################################################################ 
 2  # Ganga Project. http://cern.ch/ganga 
 3  # 
 4  # $Id: IMerger.py,v 1.1 2008-07-17 16:40:52 moscicki Exp $ 
 5  ################################################################################ 
 6  from Ganga.Core.exceptions import GangaException 
 7  from Ganga.GPIDev.Base import GangaObject 
 8  from Ganga.GPIDev.Schema import * 
 9   
10 -class MergerError(GangaException):
11 - def __init__(self,x): Exception.__init__(self,x)
12
13 -class IMerger(GangaObject):
14 """ 15 """ 16 _schema = Schema(Version(0,0), {}) 17 _category = 'mergers' 18 _hidden = 1 19 20 # set outputdir for auto merge policy flag 21 # the default behaviour (True) is that outputdir is set by runAutoMerge() function in Merger.py module 22 # however if this flag is set to False then merge() will be called for auto merge with sum_outputdir set to None 23 # thus it is up to the subclass to decide where the output goes in case of auto merge 24 set_outputdir_for_automerge = True 25
26 - def merge(self, subjobs, sum_outputdir, **options ):
27 """ 28 Merge the output of subjobs into the sum_outputdir. 29 The options (keyword arguments) are merger-implementation specific and should be defined in the derived classes. 30 """ 31 32 raise NotImplementedError
33
34 - def validatedMerge(self,job):
35 """ Some info """ 36 37 self.merge(job, sum_outputdir, subjobs) 38 39 return None
40