Package Ganga :: Package Lib :: Package Mergers :: Module Merger :: Class RootMerger :: Class _proxyClass
[hide private]
[frames] | no frames]

Class _proxyClass

source code

    object --+    
             |    
GPIProxyObject --+
                 |
                Lib.Mergers.Merger.RootMerger._proxyClass

Merger class for ROOT files

    RootMerger will use the version of ROOT configured in the .gangarc file to
    add together histograms and trees using the 'hadd' command provided by ROOT.
    Further details of the hadd command can be found in the ROOT documentation.

    Usage:

    rm = RootMerger()
    rm.files = ['hist.root','trees.root']
    rm.overwrite = True #False by default
    rm.ignorefailed = True #False by default
    rm.args = '-f2' #pass arguments to hadd

    # will produce the specified files
    j = Job() 
    j.outputsandbox = ['hist.root','trees.root']
    j.splitter = SomeSplitter()
    j.merger = rm
    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.

    #rm defined above
    rm.merge(j, outputdir = '~/merge_dir')
    rm.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.

    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.

    If outputdir is not specified, the default location specfied
    in the [Mergers] section of the .gangarc file will be used.

    

Properties:

     files        A list of files to merge.. (simple property, list,
                  default=[],comparable)

     args         Arguments to be passed to hadd.. (simple property,
                  default=None,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)

Nested Classes [hide private]
  _impl
This is a Ganga.GPI.RootMerger implementation class.
Instance Methods [hide private]
 
__eq__(self, x)
Equality operator (==), compare the RootMerger properties which are declared as [comparable].
source code
 
__init__(self, *args, **kwds)
GPI RootMerger object constructor: RootMerger() : create rootmerger with default settings; RootMerger(r) : make a copy of r; RootMerger(r,x=a,...): make a copy of r and set property 'x' to a, etc..
source code
 
__ne__(self, x)
Non-equality operator (!=).
source code
 
__repr__(self)
Return an short representation of RootMerger object.
source code
 
__setattr__(self, x, v)
Set a property of RootMerger with consistency and safety checks.
source code
 
__str__(self)
Return a printable string representing RootMerger object as a tree of properties.
source code
 
copy(self)
Make an identical copy of self.
source code
 
merge(...) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  args = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
  files = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at...
  ignorefailed = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor ob...
  overwrite = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

GPI RootMerger object constructor: RootMerger() : create rootmerger with default settings; RootMerger(r) : make a copy of r; RootMerger(r,x=a,...): make a copy of r and set property 'x' to a, etc..

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return an short representation of RootMerger object.

Overrides: object.__repr__

__setattr__(self, x, v)

source code 

Set a property of RootMerger 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 RootMerger object as a tree of properties.

Overrides: object.__str__

Class Variable Details [hide private]

args

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7b50>

files

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7ad0>

ignorefailed

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7c10>

overwrite

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x17f7c90>