Class _proxyClass
source code
object --+
|
GPIProxyObject --+
|
Lib.Mergers.Merger.SmartMerger._proxyClass
Allows the different types of merge to be run according to file extension in an automatic way.
SmartMerger accepts a list of files which it will delegate to individual Merger objects based on
the file extension of the file. The mapping between file extensions and Merger objects can
be defined in the [Mergers] section of the .gangarc file. Extensions are treated in a case
insensitive way. If a file extension is not recognized than the file will be ignored if the
ignorefailed flag is set, or the merge will fail.
Example:
sm = SmartMerger()
sm.files = ['stderr','histo.root','job.log','summary.txt','trees.root','stdout']
sm.merge([... list of jobs ...], outputdir = '~/merge_dir')#also accepts a single Job
If outputdir is not specified, the default location specfied in the [Mergers]
section of the .gangarc file will be used.
If files is not specified, then it will be taken from the list of jobs given to
the merge method. Only files which appear in all jobs will be merged.
SmartMergers can also be attached to Job objects in the same way as other Merger
objects.
#sm defined above
j = Job()
j.splitter = SomeSplitter()
j.merger = sm
j.submit()
Properties:
files A list of files to merge.. (simple property, list,
default=[],comparable)
ignorefailed Jobs that are in the failed or killed states will be excluded
from the merge when this flag is set to True.. (simple
property, default=False,comparable)
overwrite The default behaviour for this Merger object. Will overwrite
output files.. (simple property, default=False,comparable)
|
_impl
This is a Ganga.GPI.SmartMerger implementation class.
|
|
__eq__(self,
x)
Equality operator (==), compare the SmartMerger properties which are
declared as [comparable]. |
source code
|
|
|
__init__(self,
*args,
**kwds)
GPI SmartMerger object constructor: SmartMerger() : create
smartmerger with default settings; SmartMerger(s) : make a copy of s;
SmartMerger(s,x=a,...): make a copy of s and set property 'x' to a,
etc.. |
source code
|
|
|
__ne__(self,
x)
Non-equality operator (!=). |
source code
|
|
|
|
|
|
|
__str__(self)
Return a printable string representing SmartMerger object as a tree
of properties. |
source code
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__sizeof__ ,
__subclasshook__
|
|
files = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at...
|
|
ignorefailed = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor ob...
|
|
overwrite = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
|
Inherited from object :
__class__
|
__init__(self,
*args,
**kwds)
(Constructor)
| source code
|
GPI SmartMerger object constructor: SmartMerger() : create smartmerger
with default settings; SmartMerger(s) : make a copy of s;
SmartMerger(s,x=a,...): make a copy of s and set property 'x' to a,
etc..
- Overrides:
object.__init__
|
Return an short representation of SmartMerger object.
- Overrides:
object.__repr__
|
Set a property of SmartMerger with consistency and safety checks.
Setting a [protected] or a unexisting property raises AttributeError.
- Overrides:
object.__setattr__
|
__str__(self)
(Informal representation operator)
| source code
|
Return a printable string representing SmartMerger object as a tree of
properties.
- Overrides:
object.__str__
|
files
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17fe050>
|
|
ignorefailed
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17fe0d0>
|
|
overwrite
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17fe150>
|
|