Class _proxyClass
source code
object --+
|
GPIProxyObject --+
|
Lib.Mergers.Merger.TextMerger._proxyClass
Merger class for text
TextMerger will append specified text files in the order that they are
encountered in the list of Jobs. Each file will be separated by a header
giving some very basic information about the individual files.
Usage:
tm = TextMerger()
tm.files = ['job.log','results.txt']
tm.overwrite = True #False by default
tm.ignorefailed = True #False by default
# will produce the specified files
j = Job()
j.outputsandbox = ['job.log','results.txt']
j.splitter = SomeSplitter()
j.merger = tm
j.submit()
The merge object will be used to merge the output of
each subjob into j.outputdir. This will be run when
the job completes. If the ignorefailed flag has been set
then the merge will also be run as the job enters the
killed or failed states.
The above merger object can also be used independently
to merge a list of jobs or the subjobs of an single job.
#tm defined above
tm.merge(j, outputdir = '~/merge_dir')
tm.merge([.. list of jobs ...], '~/merge_dir', ignorefailed = True, overwrite = False)
If ignorefailed or overwrite are set then they override the values set on the
merge object.
If outputdir is not specified, the default location specfied
in the [Mergers] section of the .gangarc file will be used.
For large text files it may be desirable to compress the merge
result using gzip. This can be done by setting the compress
flag on the TextMerger object. In this case, the merged file
will have a '.gz' appended to its filename.
A summary of all the files merged will be created for each entry in files.
This will be created when the merge of those files completes
successfully. The name of this is the same as the output file, with the
'.merge_summary' extension appended and will be placed in the same directory
as the merge results.
Properties:
files A list of files to merge.. (simple property, list,
default=[],comparable)
compress Output should be compressed with gzip.. (simple property,
default=False,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.TextMerger implementation class.
|
|
__eq__(self,
x)
Equality operator (==), compare the TextMerger properties which are
declared as [comparable]. |
source code
|
|
|
__init__(self,
*args,
**kwds)
GPI TextMerger object constructor: TextMerger() : create textmerger
with default settings; TextMerger(t) : make a copy of t;
TextMerger(t,x=a,...): make a copy of t and set property 'x' to a,
etc.. |
source code
|
|
|
__ne__(self,
x)
Non-equality operator (!=). |
source code
|
|
|
|
|
|
|
__str__(self)
Return a printable string representing TextMerger object as a tree of
properties. |
source code
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__sizeof__ ,
__subclasshook__
|
|
compress = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
|
|
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 TextMerger object constructor: TextMerger() : create textmerger
with default settings; TextMerger(t) : make a copy of t;
TextMerger(t,x=a,...): make a copy of t and set property 'x' to a,
etc..
- Overrides:
object.__init__
|
Return an short representation of TextMerger object.
- Overrides:
object.__repr__
|
Set a property of TextMerger 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 TextMerger object as a tree of
properties.
- Overrides:
object.__str__
|
compress
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7850>
|
|
files
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7790>
|
|
ignorefailed
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f78d0>
|
|
overwrite
- Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7950>
|
|